Add messaging for build;

This commit is contained in:
Benjamin Bouvier 2016-06-23 22:21:04 +02:00
parent 94cb421a29
commit cf6492970d

View File

@ -81,9 +81,22 @@ var handlers = {
}, },
build: function(body) { build: function(body) {
console.log('build event NYI because not documented');
console.log(body); var id = body.build_id;
return null; var status = body.build_status;
var isFinished = body.build_finished_at !== null;
var duration = body.build_duration;
var projectName = body.project_name;
var stage = body.build_stage;
var msg = [];
msg.push(projectName + ': build #' + id + ' (' + stage + ') changed status: ' + status);
if (isFinished)
msg.push('build finished in ' + duration + ' seconds. ');
return msg;
} }
}; };