<commit_before>module CronForGithub
  class Ping
    NAMESPACE = 'cron_for_github'
    BASE = 'master'

    def ping(params)
      client = Client.new
      slug = decide_slug(params[:slug])
      head_ref = decide_head_ref(params[:base])
      cron_ref = decide_cron_ref(params[:namespace])

      latest_sha = client.latest_sha(slug, head_ref)
      client.create_ref(slug, cron_ref, latest_sha)
    end

    def decide_slug(text)
      text
    end

    def decide_head_ref(text)
      text = BASE if !text || text.empty?
      "heads/#{text}"
    end
<commit_msg>chore(refs): add reserved refs for safe<commit_after>module CronForGithub
  class Ping
    NAMESPACE = 'cron_for_github'
    BASE = 'master'
    RESERVED_REFS = %w(
      tags
      gh-pages
      master
      branches
      trunk
      feature
      develop
      release
      hotfix
    )

    def ping(params)
      client = Client.new
      slug = decide_slug(params[:slug])
      head_ref = decide_head_ref(params[:base])
      cron_ref = decide_cron_ref(params[:namespace])

      latest_sha = client.latest_sha(slug, head_ref)
      client.create_ref(slug, cron_ref, latest_sha)
    end

    def decide_slug(text)
      text
    end

    def decide_head_ref(text)
      text = BASE if !text || text.empty?
      "heads/#{text}"
    end

{'fraction_non_alphanumeric': 0.09305873379099924, 'fraction_numerical': 0.0, 'mean_word_length': 2.545945945945946, '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': '786446', 'n_tokens_mistral': 456, 'n_tokens_neox': 449, 'n_words': 92}