buggsen gefiggst

This commit is contained in:
Flummi 2016-09-10 18:29:12 +02:00
parent 395ebbe9f8
commit a23c3a059e

View File

@ -34,7 +34,15 @@ function Websrv(tbot, tsql, tlib) {
body = JSON.parse(body); body = JSON.parse(body);
var eventname = body.event_name; var eventname = body.event_name;
var autor = body.user_name; var autor = body.user_name;
var commit = body.commits[body.commits.length-1].message.replace('\n','').trim();
var commit = "";
try {
commit = body.commits[body.commits.length-1].message.replace('\n','').trim();
}
catch(ex) {
commit body.commits[body.commits.length-2].message.replace('\n','').trim();
}
lib.log( eventname + ' from ' + autor + ' ('+commit+')' ); lib.log( eventname + ' from ' + autor + ' ('+commit+')' );
}); });
res.writeHead(200, { 'Content-Type': 'text/html' }); res.writeHead(200, { 'Content-Type': 'text/html' });