Be more concise;

This commit is contained in:
Benjamin Bouvier 2016-06-23 22:26:52 +02:00
parent bda1e25f5e
commit e6013e04c6
1 changed files with 3 additions and 6 deletions

View File

@ -35,8 +35,7 @@ var handlers = {
if (commits.length < 4) { if (commits.length < 4) {
msg = msg.concat(commits.map(formatCommit)); msg = msg.concat(commits.map(formatCommit));
} else { } else {
msg.push(formatCommit(commits[0])); msg.push(formatCommit(commits[0]) + ' ...');
msg.push('...');
msg.push(formatCommit(commits[commits.length - 1])); msg.push(formatCommit(commits[commits.length - 1]));
} }
@ -54,8 +53,7 @@ var handlers = {
var url = issue.url; var url = issue.url;
var msg = [projectName + ': issue #' + issueNumber + ' has changed state ("' + issueState + '")']; var msg = [projectName + ': issue #' + issueNumber + ' has changed state ("' + issueState + '")'];
msg.push(issueTitle); msg.push(issueTitle + ' ' + url);
msg.push(url);
return msg; return msg;
}, },
@ -76,8 +74,7 @@ var handlers = {
var state = request.state; var state = request.state;
var msg = [projectName + ': merge request (' + from + ':' + to + ') #' + id + ' has changed state ("' + state + '")']; var msg = [projectName + ': merge request (' + from + ':' + to + ') #' + id + ' has changed state ("' + state + '")'];
msg.push(title); msg.push(title + ' ' + url);
msg.push(url);
return msg; return msg;
}, },