Add messaging for build;
This commit is contained in:
parent
94cb421a29
commit
cf6492970d
19
index.js
19
index.js
@ -81,9 +81,22 @@ var handlers = {
|
||||
},
|
||||
|
||||
build: function(body) {
|
||||
console.log('build event NYI because not documented');
|
||||
console.log(body);
|
||||
return null;
|
||||
|
||||
var id = body.build_id;
|
||||
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;
|
||||
}
|
||||
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user