<commit_before>require 'rails_autolink'

class UserMailer < ActionMailer::Base
  default from: "CodeTriage <<EMAIL>>"

  def send_daily_triage(options = {})
    @user        = options[:user]
    @assignments = options[:assignments]
    @max_days    = 2
    subject = ""
    @days   = @user.days_since_last_clicked
    subject << "[#{@days} days] " if @days > @max_days
    subject << "Help Triage #{@assignments.size} Open Source #{ "Issue".pluralize(@assignments.count)}"
    mail(to: @user.email, reply_to: "<EMAIL>", subject: subject)
  end


  def send_triage(options = {})
    raise "no assignment" unless assignment =  options[:assignment]
    @user  = options[:user]
    @repo  = options[:repo]
    @issue = assignment.issue
    mail(to: @user.email, reply_to: "<EMAIL>", subject: "Help Triage #{@repo.path} on GitHub")
  end

  def poke_inactive(user)
    @user        = user
    @most_repo   = Repo.order_by_issue_count.first
    @need_repo   = Repo.order_by_need.not_in(@most_repo.id).first
    @random_repo = Repo.rand.not_in(@most_repo.id, @need_repo.id).first
    mail(to: @user.email, reply_to: "<EMAIL>", subject: "Code Triage misses you")
  end

  def invalid_token(user)
    @user = user
    mail(to: @user.email, reply_to: "<EMAIL>", subject: "Code Triage auth failure")
  end

<commit_msg>Determine plurality of "issue" using .size method<commit_after>require 'rails_autolink'

class UserMailer < ActionMailer::Base
  default from: "CodeTriage <<EMAIL>>"

  def send_daily_triage(options = {})
    @user        = options[:user]
    @assignments = options[:assignments]
    @max_days    = 2
    subject = ""
    @days   = @user.days_since_last_clicked
    subject << "[#{@days} days] " if @days > @max_days
    subject << "Help Triage #{@assignments.size} Open Source #{"Issue".pluralize(@assignments.size)}"
    mail(to: @user.email, reply_to: "<EMAIL>", subject: subject)
  end


  def send_triage(options = {})
    raise "no assignment" unless assignment =  options[:assignment]
    @user  = options[:user]
    @repo  = options[:repo]
    @issue = assignment.issue
    mail(to: @user.email, reply_to: "<EMAIL>", subject: "Help Triage #{@repo.path} on GitHub")
  end

  def poke_inactive(user)
    @user        = user
    @most_repo   = Repo.order_by_issue_count.first
    @need_repo   = Repo.order_by_need.not_in(@most_repo.id).first
    @random_repo = Repo.rand.not_in(@most_repo.id, @need_repo.id).first
    mail(to: @user.email, reply_to: "<EMAIL>", subject: "Code Triage misses you")
  end

  def invalid_token(user)
    @user = user
    mail(to: @user.email, reply_to: "<EMAIL>", subject: "Code Triage auth failure")
  end


{'fraction_non_alphanumeric': 0.14528301886792452, 'fraction_numerical': 0.0007547169811320754, 'mean_word_length': 3.7254901960784315, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 17, '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': '7189636', 'n_tokens_mistral': 936, 'n_tokens_neox': 916, 'n_words': 206}