Fix displayed action
This commit is contained in:
parent
4fd4ec8be3
commit
a7f6a028a6
8
index.js
8
index.js
@ -127,8 +127,14 @@ var handlers = {
|
|||||||
if (issue.action === 'update')
|
if (issue.action === 'update')
|
||||||
return;
|
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) {
|
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);
|
say(msg);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user