<commit_before>class ReportMailer < ApplicationMailer
  def commits_on_2weeks_ago(user)
    client = user.client

    @list = user.repos_to_check.reduce({}) do |hash, r|
      commits = client.commits(r.full_name, author: user.email, since: (Time.now - 14.days).utc.iso8601, until: (Time.now - 13.days).utc.iso8601)
      hash[r.full_name] = commits unless commits.size == 0
      hash
    end

    mail(to: user.email, subject: "[#{Time.zone.now.strftime('%F')}] Your commits before 2 weeks ago.")
  end
end
<commit_msg>mail will not be sent user had any commit before 2 weeks age<commit_after>class ReportMailer < ApplicationMailer
  def commits_on_2weeks_ago(user)
    client = user.client

    count = 0
    @list = user.repos_to_check.reduce({}) do |hash, r|
      commits = client.commits(r.full_name, author: user.email, since: (Time.now - 14.days).utc.iso8601, until: (Time.now - 13.days).utc.iso8601)
      unless commits.size == 0
        hash[r.full_name] = commits 
        count += 1
      end
      hash
    end

    mail(to: user.email, subject: "[#{Time.zone.now.strftime('%F')}] Your commits before 2 weeks ago.") unless count == 0
  end
end

{'fraction_non_alphanumeric': 0.13201035375323555, 'fraction_numerical': 0.029335634167385678, 'mean_word_length': 3.2181818181818183, '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': '332305', 'n_tokens_mistral': 437, 'n_tokens_neox': 397, 'n_words': 102}