<commit_before>module NotificationsHelper
  REASON_LABELS = {
    'comment'      => 'primary',
    'author'       => 'success',
    'state_change' => 'info',
    'mention'      => 'warning',
    'assign'       => 'danger'
  }.freeze

  SUBJECT_TYPES = {
    'RepositoryInvitation' => 'mail-read',
    'Issue'                => 'issue-opened',
    'PullRequest'          => 'git-pull-request',
    'Commit'               => 'git-commit',
    'Release'              => 'tag'
  }.freeze

  def filters
    {
      reason:   params[:reason],
      status:   params[:status],
      repo:     params[:repo],
      type:     params[:type],
      archive:  params[:archive],
      starred:  params[:starred],
      owner:    params[:owner],
      per_page: params[:per_page],
      q:        params[:q]
    }
  end

  def notification_param_keys
    filters.keys - [:per_page]
  end

  def bucket_param_keys
    [:archived, :starred]
  end

  def filter_param_keys
    notification_param_keys - bucket_param_keys
  end

  def any_active_filters?
    filter_param_keys.any?{|param| filters[param].present? }
  end

  def filtered_params(override = {})
    filters.merge(override)
  end

  def mute_selected_button(custom_class=nil)
    unless params[:archive]
      button_tag(type: 'button', class: "mute_selected #{custom_class}") do
        octicon('mute', height: 16) + content_tag(:span, ' Mute selected', class: 'hidden-xs')
      end
    end
  end

  def archive_selected_button(custom_class=nil)
    action = params[:archive] ? 'unarchive' : 'archive'
    button_tag(type: "button",
               class: "archive_toggle #{action}_selected #{custom_class}") do
      octicon('checklist', height: 16) + content_tag(:span, " #{action.capitalize} selected", class: 'hidden-xs')
    end
  end

  def no_url_filter_parameters_present
    notification_param_keys.all?{|param| params[param].blank? }
  end

  def notification_icon(subject_type)
    SUBJECT_TYPES[subject_type]
  end

  def reason_label(reason)
    REASON_LABELS.fetch(reason, 'default')
  end
end
<commit_msg>Typo fix, fixes #233<commit_after>module NotificationsHelper
  REASON_LABELS = {
    'comment'      => 'primary',
    'author'       => 'success',
    'state_change' => 'info',
    'mention'      => 'warning',
    'assign'       => 'danger'
  }.freeze

  SUBJECT_TYPES = {
    'RepositoryInvitation' => 'mail-read',
    'Issue'                => 'issue-opened',
    'PullRequest'          => 'git-pull-request',
    'Commit'               => 'git-commit',
    'Release'              => 'tag'
  }.freeze

  def filters
    {
      reason:   params[:reason],
      status:   params[:status],
      repo:     params[:repo],
      type:     params[:type],
      archive:  params[:archive],
      starred:  params[:starred],
      owner:    params[:owner],
      per_page: params[:per_page],
      q:        params[:q]
    }
  end

  def notification_param_keys
    filters.keys - [:per_page]
  end

  def bucket_param_keys
    [:archive, :starred]
  end

  def filter_param_keys
    notification_param_keys - bucket_param_keys
  end

  def any_active_filters?
    filter_param_keys.any?{|param| filters[param].present? }
  end

  def filtered_params(override = {})
    filters.merge(override)
  end

  def mute_selected_button(custom_class=nil)
    unless params[:archive]
      button_tag(type: 'button', class: "mute_selected #{custom_class}") do
        octicon('mute', height: 16) + content_tag(:span, ' Mute selected', class: 'hidden-xs')
      end
    end
  end

  def archive_selected_button(custom_class=nil)
    action = params[:archive] ? 'unarchive' : 'archive'
    button_tag(type: "button",
               class: "archive_toggle #{action}_selected #{custom_class}") do
      octicon('checklist', height: 16) + content_tag(:span, " #{action.capitalize} selected", class: 'hidden-xs')
    end
  end

  def no_url_filter_parameters_present
    notification_param_keys.all?{|param| params[param].blank? }
  end

  def notification_icon(subject_type)
    SUBJECT_TYPES[subject_type]
  end

  def reason_label(reason)
    REASON_LABELS.fetch(reason, 'default')
  end
end

{'fraction_non_alphanumeric': 0.12988894253983582, 'fraction_numerical': 0.002655721873491067, 'mean_word_length': 2.8647388059701493, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 23, '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': '802233', 'n_tokens_mistral': 1375, 'n_tokens_neox': 1331, 'n_words': 263}