<commit_before>module Cogbot
  class CallbackHandler
    include Cinch::Plugin

    listen_to :api_callback

    def listen(m, json)
      bot.loggers.debug(URI.unescape(json))
      hash = Yajl::Parser.parse(URI.unescape(json))
      config['main']['channels'].each do |channel|
        hash[:commits].each do |c|
          Channel(channel).send "[%s:%s] %s <%s>" % [
            hash[:repository][:name],
            c[:author][:name],
            c[:message],
            c[:url]
          ]
        end
      end
    end

  end
end<commit_msg>ca va le faire!<commit_after>module Cogbot
  class CallbackHandler
    include Cinch::Plugin

    listen_to :api_callback

    def listen(m, json)
      bot.loggers.debug(URI.unescape(json[8..-1]))
      hash = Yajl::Parser.parse(URI.unescape(json[8..-1]))
      config['main']['channels'].each do |channel|
        hash[:commits].each do |c|
          Channel(channel).send "[%s:%s] %s <%s>" % [
            hash[:repository][:name],
            c[:author][:name],
            c[:message],
            c[:url]
          ]
        end
      end
    end

  end
end
{'fraction_non_alphanumeric': 0.15405405405405406, 'fraction_numerical': 0.0036036036036036037, 'mean_word_length': 2.0861111111111112, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '337626', 'n_tokens_mistral': 363, 'n_tokens_neox': 360, 'n_words': 68}