<commit_before># coding: utf-8
require 'octokit'
require 'redcarpet'

module Danger
  class GitHub
    attr_accessor :ci_source, :pr_json, :issue_json, :environment, :base_commit, :head_commit, :support_tokenless_auth, :ignored_violations, :github_host

    def initialize(ci_source, environment)
      self.ci_source = ci_source
      self.environment = environment
      self.support_tokenless_auth = false

      Octokit.auto_paginate = true
      @token = @environment["DANGER_GITHUB_API_TOKEN"]
      self.github_host = @environment["DANGER_GITHUB_HOST"] || "github.com"
      if @environment["DANGER_GITHUB_API_HOST"]
        Octokit.api_endpoint = @environment["DANGER_GITHUB_API_HOST"]
      end
    end

    def client
      raise "No API given, please provide one using `DANGER_GITHUB_API_TOKEN`" if !@token && !support_tokenless_auth

      @client ||= Octokit::Client.new(
        access_token: @token
      )
    end

    def markdown_parser
      @markdown_parser ||= Redcarpet::Markdown.new(Redcarpet::Render::HTML)
    end
<commit_msg>Prevent snake_cased_variables to be parsed as emphasis<commit_after># coding: utf-8
require 'octokit'
require 'redcarpet'

module Danger
  class GitHub
    attr_accessor :ci_source, :pr_json, :issue_json, :environment, :base_commit, :head_commit, :support_tokenless_auth, :ignored_violations, :github_host

    def initialize(ci_source, environment)
      self.ci_source = ci_source
      self.environment = environment
      self.support_tokenless_auth = false

      Octokit.auto_paginate = true
      @token = @environment["DANGER_GITHUB_API_TOKEN"]
      self.github_host = @environment["DANGER_GITHUB_HOST"] || "github.com"
      if @environment["DANGER_GITHUB_API_HOST"]
        Octokit.api_endpoint = @environment["DANGER_GITHUB_API_HOST"]
      end
    end

    def client
      raise "No API given, please provide one using `DANGER_GITHUB_API_TOKEN`" if !@token && !support_tokenless_auth

      @client ||= Octokit::Client.new(
        access_token: @token
      )
    end

    def markdown_parser
      @markdown_parser ||= Redcarpet::Markdown.new(Redcarpet::Render::HTML, no_intra_emphasis: true)
    end

{'fraction_non_alphanumeric': 0.0959409594095941, 'fraction_numerical': 0.0009225092250922509, 'mean_word_length': 3.986206896551724, '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': '5378528', 'n_tokens_mistral': 735, 'n_tokens_neox': 713, 'n_words': 142}