Skip to content

Commit

Permalink
[npm] run publish
Browse files Browse the repository at this point in the history
  • Loading branch information
8398a7 committed Aug 15, 2019
1 parent 8c9e775 commit 2957a6b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ function run() {
case 'success':
payload = slack_1.successPayload();
break;
case 'failed':
payload = slack_1.failedPayload();
case 'failure':
payload = slack_1.failurePayload();
break;
default:
payload = JSON.parse(core.getInput('payload'));
Expand Down
4 changes: 2 additions & 2 deletions lib/slack.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ function successPayload() {
return payload;
}
exports.successPayload = successPayload;
function failedPayload() {
function failurePayload() {
const payload = successPayload();
payload.text = 'Failed Workflow';
if (payload.attachments !== undefined) {
payload.attachments[0].color = 'danger';
}
return payload;
}
exports.failedPayload = failedPayload;
exports.failurePayload = failurePayload;
function newWebhook() {
if (process.env.SLACK_WEBHOOK_URL === undefined) {
throw new Error('Specify SLACK_WEBHOOK_URL');
Expand Down

0 comments on commit 2957a6b

Please sign in to comment.