<commit_before>var request = require('request');

var prevUserName = 'richard';
var userName = 'richard';

module.exports = function ilyf (req, res, next) {

  console.log(req.body);

  // avoid infinite loop
  if (userName !== 'slackbot') {
    prevUserName = userName === req.body.user_name ? prevUserName : userName;
    userName = req.body.user_name;
    
    var botPayload = {
      username: 'kanye-west',
      
      // Yo, Taylor, I'm really happy for you, I'ma let you finish, but Beyoncé had one of the best videos of all time! One of the best videos of all time!
      text : 'Yo, @' + userName + ', I\'m really happy for you, I\'ma let you finish, but ' + prevUserName + ' had one of the best comments of all time! One of the best comments of all time!'
    };
    send(botPayload, function(err, status, body) {
      if (err) {
        return next(err);

      } else if (status !== 200) {
        // inform user that our Incoming WebHook failed
        return next(new Error('Incoming WebHook: ' + status + ' ' + body));

      } else {
        return res.status(200).end();
      }
    });
  } else {<commit_msg>check if user is slackbot<commit_after>var request = require('request');

var prevUserName = 'richard';
var userName = 'richard';

module.exports = function ilyf (req, res, next) {

  console.log(req.body);

  // avoid infinite loop
  if (req.body.user_name !== 'slackbot') {
    prevUserName = userName === req.body.user_name ? prevUserName : userName;
    userName = req.body.user_name;
    
    var botPayload = {
      username: 'kanye-west',
      
      // Yo, Taylor, I'm really happy for you, I'ma let you finish, but Beyoncé had one of the best videos of all time! One of the best videos of all time!
      text : 'Yo, @' + userName + ', I\'m really happy for you, I\'ma let you finish, but @' + prevUserName + ' had one of the best comments of all time! One of the best comments of all time!'
    };
    send(botPayload, function(err, status, body) {
      if (err) {
        return next(err);

      } else if (status !== 200) {
        // inform user that our Incoming WebHook failed
        return next(new Error('Incoming WebHook: ' + status + ' ' + body));

      } else {
        return res.status(200).end();
      }
    });
  } else {
{'fraction_non_alphanumeric': 0.12669881630863655, 'fraction_numerical': 0.00526085050416484, 'mean_word_length': 2.662921348314607, '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': '210230', 'n_tokens_mistral': 729, 'n_tokens_neox': 703, 'n_words': 250}