<commit_before>var Botkit = require('botkit');
var CoffeeScript = require('coffee-script');
CoffeeScript.register();
var Hubot = require('hubot');

function prepareUtterance(utterance) {
  return Object.assign({
    user: utterance.message.user.id,
    channel: (utterance.channel) ? utterance.channel : "SHARED",
    team: (utterance.team) ? utterance.team : "SHARED",
    text: utterance.message.text,
    reply: function(text) {
      utterance.reply(text)
    },
    send: function(text) {
      utterance.send(text)
    }
  }, utterance)
}

function HubotBot(config) {

  // Create a core botkit bot
  var hubot_botkit = Botkit.core(Object.assign({}, config))

  // customize the bot definition, which will be used when new connections
  // spawn!
  hubot_botkit.defineBot(function(botkit, config) {

      var bot = {
          botkit: botkit,
          config: Object.assign({
            name: 'pozi',
            client: 'shell'
          }, config || {}),
          utterances: botkit.utterances,
      };

      this.hubot = Hubot.loadBot(null, bot.config.client, true, bot.config.name, null)

      bot.startConversation = function(utterance, cb) {
          botkit.startConversation(this, utterance, cb);
      };

      bot.send = function(utterance, cb) {

        utterance.send(utterance.text)

        if (cb) {
          cb()
        }
      };

      bot.reply = function(utterance, response, cb) {
        utterance.reply(response)

        if (cb) {
          cb()
        }
      };

      bot.findConversation = function(message, cb) {<commit_msg>Declare hubot.<commit_after>var Botkit = require('botkit');
var CoffeeScript = require('coffee-script');
CoffeeScript.register();
var Hubot = require('hubot');

function prepareUtterance(utterance) {
  return Object.assign({
    user: utterance.message.user.id,
    channel: (utterance.channel) ? utterance.channel : "SHARED",
    team: (utterance.team) ? utterance.team : "SHARED",
    text: utterance.message.text,
    reply: function(text) {
      utterance.reply(text)
    },
    send: function(text) {
      utterance.send(text)
    }
  }, utterance)
}

function HubotBot(config) {

  // Create a core botkit bot
  var hubot_botkit = Botkit.core(Object.assign({}, config))

  // customize the bot definition, which will be used when new connections
  // spawn!
  hubot_botkit.defineBot(function(botkit, config) {

      var bot = {
          botkit: botkit,
          config: Object.assign({
            name: 'pozi',
            client: 'shell'
          }, config || {}),
          utterances: botkit.utterances,
      };

      var hubot = Hubot.loadBot(null, bot.config.client, true, bot.config.name, null)

      bot.startConversation = function(utterance, cb) {
          botkit.startConversation(this, utterance, cb);
      };

      bot.send = function(utterance, cb) {

        utterance.send(utterance.text)

        if (cb) {
          cb()
        }
      };

      bot.reply = function(utterance, response, cb) {
        utterance.reply(response)

        if (cb) {
          cb()
        }
      };

      bot.findConversation = function(message, cb) {
{'fraction_non_alphanumeric': 0.13112667091024824, 'fraction_numerical': 0.0, 'mean_word_length': 2.4500548847420416, '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': '2046871', 'n_tokens_mistral': 999, 'n_tokens_neox': 970, 'n_words': 204}