<commit_before>class EventsController < ApplicationController
  skip_before_filter :verify_authenticity_token
  before_filter :skip_authorization

  def create
    IngestEventJob.perform_later(
      event: request.headers['X-GitHub-Event'],
      data:  JSON.parse(request.body.read),
    )
    render nothing: true, status: 201
  end<commit_msg>Ignore events with missing type<commit_after>class EventsController < ApplicationController
  skip_before_filter :verify_authenticity_token
  before_filter :skip_authorization

  def create
    event_type = request.headers['X-GitHub-Event']
    if event_type.blank?
      Rails.logger.warn 'Missing event type, ignoring'
    else
      IngestEventJob.perform_later(
        event: event_type,
        data:  JSON.parse(request.body.read),
      )
    end

    render nothing: true, status: 201
  end
{'fraction_non_alphanumeric': 0.07565011820330969, 'fraction_numerical': 0.0070921985815602835, 'mean_word_length': 3.84, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3612148', 'n_tokens_mistral': 258, 'n_tokens_neox': 242, 'n_words': 54}