Merge branch 'patch-1' into 'master'

Fix displayed action

See merge request !5
This commit is contained in:
Benjamin Bouvier 2017-09-12 16:34:08 +02:00
commit 06d8c9536b

View File

@ -127,8 +127,14 @@ var handlers = {
if (issue.action === 'update')
return;
// Make action displayable :
// open -> opened
// close -> closed
// merge -> merged
var displayedAction = issue.action.substr(-1) === 'e' ? issue.action + 'd' : issue.action + 'ed';
shortenURL(url, function(shortUrl) {
var msg = user + ' ' + issue.action + 'd issue #' + issueNumber + ' ("' + issueTitle + '") on ' + projectName + ' ' + shortUrl;
var msg = user + ' ' + displayedAction ' issue #' + issueNumber + ' ("' + issueTitle + '") on ' + projectName + ' ' + shortUrl;
say(msg);
});
},