<commit_before>module.exports.jenkinsBestBuy = function (req, res) {

	var notification = req.body;
	var build = notification.build;

	if (build.full_url.indexOf('bestbuy.com') == 0) return res.ok('welp');
	if (build.phase != 'FINISHED') return res.ok('thanks');

	var roomId;
	var text = 'Build Notification: ' + notification.name + ' | Status: ' + build.status + ' | ' + build.full_url;

	Room.findOne({name: 'BestBuy'})
		.then(function (room) {
			roomId = room.id;
			return Message.create({
				room: room.id,
				text: text
			})
		})
		.then(function (message) {
			return Message.findOne(message.id).populateAll();
		})
		.then(function (message) {
			Room.message(roomId, message);
			return message;
		})
		.then(res.ok)
		.catch(res.serverError);
};<commit_msg>added parrot to failure notice<commit_after>module.exports.jenkinsBestBuy = function (req, res) {

	var notification = req.body;
	var build = notification.build;

	if (build.full_url.indexOf('bestbuy.com') == 0) return res.ok('welp');
	if (build.phase != 'FINISHED') return res.ok('thanks');

	var roomId;
	var parrot = build.status == 'FAILURE' ? ' :parrot:' : '';
	var text = 'Build Notification: ' + notification.name + ' | Status: ' + build.status + parrot + ' | ' + build.full_url;

	Room.findOne({name: 'BestBuy'})
		.then(function (room) {
			roomId = room.id;
			return Message.create({
				room: room.id,
				text: text
			})
		})
		.then(function (message) {
			return Message.findOne(message.id).populateAll();
		})
		.then(function (message) {
			Room.message(roomId, message);
			return message;
		})
		.then(res.ok)
		.catch(res.serverError);
};
{'fraction_non_alphanumeric': 0.17279411764705882, 'fraction_numerical': 0.0012254901960784314, 'mean_word_length': 3.747093023255814, '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': '4036881', 'n_tokens_mistral': 642, 'n_tokens_neox': 566, 'n_words': 118}