<commit_before>require "octokit"

module HubRelease
  class Generator
    CLOSE_REGEX = /(((close|resolve)(s|d)?)|fix(e(s|d))?) #(\d+)/i

    def initialize(options)
      @client = Octokit::Client.new access_token: options[:token]
      @repo = options[:repo]
      @base_tag = options[:prev]
      @head_tag = options[:new]
    end

    def generate
      base_ref = fetch_base_tag
      head_ref = fetch_head_tag

      issues = fetch_issues(base_ref.tagger.date, head_ref.tagger.date)

      issues = exclude_closed_by_pull_request(issues)<commit_msg>Use author if tagger isn't available<commit_after>require "octokit"

module HubRelease
  class Generator
    CLOSE_REGEX = /(((close|resolve)(s|d)?)|fix(e(s|d))?) #(\d+)/i

    def initialize(options)
      @client = Octokit::Client.new access_token: options[:token]
      @repo = options[:repo]
      @base_tag = options[:prev]
      @head_tag = options[:new]
    end

    def generate
      base_ref = fetch_base_tag
      head_ref = fetch_head_tag

      base_date = (base_ref.tagger ? base_ref.tagger.date : base_ref.author.date)
      head_date = (head_ref.tagger ? head_ref.tagger.date : head_ref.author.date)

      issues = fetch_issues(base_date, head_date)

      issues = exclude_closed_by_pull_request(issues)
{'fraction_non_alphanumeric': 0.12304075235109718, 'fraction_numerical': 0.0, 'mean_word_length': 3.5770609318996414, 'pattern_counts': {'":': 0, '<': 3, '<?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': '1021672', 'n_tokens_mistral': 446, 'n_tokens_neox': 432, 'n_words': 78}