<commit_before>var express = require('express');
var app = express();
var git = require('simple-git');
// executes `pwd`

app.get('/', function (req, res) {

  console.log(__dirname);

  git(__dirname)
     .pull(function(err, update) {

       console.log('Paso');
        if(update && update.summary.changes) {
           require('child_process').exec('npm restart',function(error, stdout, stderr) {
              if (error) {
                console.error('exec error: ', error);
                console.log('stderr: ', stderr);
                return;
              }
              console.log(stdout);
            });
        }
      });
});<commit_msg>Add responde in webhook<commit_after>var express = require('express');
var app = express();
var git = require('simple-git');
// executes `pwd`

app.get('/', function (req, res) {

  console.log(__dirname);

  git(__dirname)
     .pull(function(err, update) {

       console.log('Paso');
        if(update && update.summary.changes) {
           require('child_process').exec('npm restart',function(error, stdout, stderr) {
              if (error) {
                console.error('exec error: ', error);
                console.log('stderr: ', stderr);
                res.json({success: false, err: error});
              }
              res.json({success: true});
              console.log(stdout);
            });
        } else {
          res.json({success: true});
        }
      });
});
{'fraction_non_alphanumeric': 0.16517549896765313, 'fraction_numerical': 0.0, 'mean_word_length': 1.9734151329243355, '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': '701193', 'n_tokens_mistral': 421, 'n_tokens_neox': 402, 'n_words': 81}