<commit_before>const request  = require('request'),
      jsonfile = require('jsonfile'),
      fs       = require('fs'),
      config   = require('./config');

const STATUS_FILE='/tmp/' + config.projectName + '.status.json';
const STATUS_MESSAGE=config.slack.message || ':tophat: Kickstarter update: ${BACKERS} backers, $${PLEDGED} pledged!'

function post_slack_message(backers, pledged) {
	var msg = STATUS_MESSAGE.replace('${BACKERS}', backers);
	msg = msg.replace('${PLEDGED}', pledged);
	request.post('https://slack.com/api/chat.postMessage', {form:{'token':config.slack.token,'channel':config.slack.channel,'text':msg, 'as_user':false, 'username':config.slack.username, 'icon_emoji':config.iconEmoje}}, function(error, response, body) {
	});
}

function check(status) {
	var ksURL='https://www.kickstarter.com/projects/search.json?search=&term=' + config.projectName;
	request({ 'url': ksURL, 'method' : 'GET', 'json' : true }, function (error, response, body) {
		if (!error && response.statusCode == 200) {
			for (var projectIdx in body.projects) {
				var project = body.projects[projectIdx];
				if (project.id == config.projectId) {<commit_msg>Fix typo in emoji config variable name<commit_after>const request  = require('request'),
      jsonfile = require('jsonfile'),
      fs       = require('fs'),
      config   = require('./config');

const STATUS_FILE='/tmp/' + config.projectName + '.status.json';
const STATUS_MESSAGE=config.slack.message || ':tophat: Kickstarter update: ${BACKERS} backers, $${PLEDGED} pledged!'

function post_slack_message(backers, pledged) {
	var msg = STATUS_MESSAGE.replace('${BACKERS}', backers);
	msg = msg.replace('${PLEDGED}', pledged);
	request.post('https://slack.com/api/chat.postMessage', {form:{'token':config.slack.token,'channel':config.slack.channel,'text':msg, 'as_user':false, 'username':config.slack.username, 'icon_emoji':config.iconEmoji}}, function(error, response, body) {
	});
}

function check(status) {
	var ksURL='https://www.kickstarter.com/projects/search.json?search=&term=' + config.projectName;
	request({ 'url': ksURL, 'method' : 'GET', 'json' : true }, function (error, response, body) {
		if (!error && response.statusCode == 200) {
			for (var projectIdx in body.projects) {
				var project = body.projects[projectIdx];
				if (project.id == config.projectId) {
{'fraction_non_alphanumeric': 0.18127404873877725, 'fraction_numerical': 0.0025651988029072254, 'mean_word_length': 5.273458445040214, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 2, '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': '3890431', 'n_tokens_mistral': 800, 'n_tokens_neox': 755, 'n_words': 148}