<commit_before>class GitHub
  include Cinch::Plugin

  match /ghissue (.+) (.+)/, method: :ghissue
  match /ghpull (.+) (.+)/, method: :ghissue

  def ghissue(m, repo, issuenum)
    issueurl = "https://api.github.com/repos/#{repo}/issues/#{issuenum}"
    begin
      parsed = JSON.parse(RestClient.get(issueurl))
    rescue
      m.reply 'Invalid Repo or Issue number!'
      return
    end
    issuenum = parsed['number'] if issuenum == 'latest'
    issuenum = issuenum.to_i
    if issuenum < 1
      m.reply 'Invalid Issue count!'
      return
    end
    issueorpull = parsed['html_url'].split('/')[5]
    issueorpull = 'Issue' if issueorpull == 'issues'
    issueorpull = 'Pull' if issueorpull == 'pull'
    status = parsed['state']
    if status == 'closed'
      statusformatted = Format(:bold, Format(:red, 'Closed'))
      statusformatted += " by #{parsed['closed_by']['login']}"
    end
    statusformatted = Format(:bold, Format(:green, 'Open')) if status == 'open'
    m.reply "#{issueorpull} ##{issuenum} (#{statusformatted}): #{parsed['html_url']} | #{parsed['title']}"
  end
end<commit_msg>Always test your bots before you push!<commit_after>class GitHub
  include Cinch::Plugin

  match /ghissue (.+) (.+)/, method: :ghissue
  match /ghpull (.+) (.+)/, method: :ghissue

  def ghissue(m, repo, issuenum)
    issuenum = '' if issuenum == 'latest'
    issueurl = "https://api.github.com/repos/#{repo}/issues/#{issuenum}"
    begin
      parsed = JSON.parse(RestClient.get(issueurl))
    rescue
      m.reply 'Invalid Repo or Issue number!'
      return
    end
    issuenum = issuenum.to_i
    if issuenum < 1
      m.reply 'Invalid Issue count!'
      return
    end
    issueorpull = parsed['html_url'].split('/')[5]
    issueorpull = 'Issue' if issueorpull == 'issues'
    issueorpull = 'Pull' if issueorpull == 'pull'
    status = parsed['state']
    if status == 'closed'
      statusformatted = Format(:bold, Format(:red, 'Closed'))
      statusformatted += " by #{parsed['closed_by']['login']}"
    end
    statusformatted = Format(:bold, Format(:green, 'Open')) if status == 'open'
    m.reply "#{issueorpull} ##{issuenum} (#{statusformatted}): #{parsed['html_url']} | #{parsed['title']}"
  end
end
{'fraction_non_alphanumeric': 0.1689950428120775, 'fraction_numerical': 0.0018026137899954935, 'mean_word_length': 3.378698224852071, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '7012162', 'n_tokens_mistral': 757, 'n_tokens_neox': 735, 'n_words': 176}