Skip to content
This repository has been archived by the owner on Jan 28, 2022. It is now read-only.

Commit

Permalink
fix: fail correctly if SLACK_WEBHOOK_URL unset
Browse files Browse the repository at this point in the history
  • Loading branch information
annybs committed Nov 25, 2020
1 parent e711ccc commit c049f2e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3040,6 +3040,9 @@ const core = __webpack_require__(470)
const { IncomingWebhook } = __webpack_require__(736)

try {
if (!process.env.SLACK_WEBHOOK_URL) {
throw new Error('SLACK_WEBHOOK_URL is not set!')
}
const slack = new IncomingWebhook(process.env.SLACK_WEBHOOK_URL)

/* eslint-disable no-eval */
Expand Down
3 changes: 3 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ const core = require('@actions/core')
const { IncomingWebhook } = require('@slack/webhook')

try {
if (!process.env.SLACK_WEBHOOK_URL) {
throw new Error('SLACK_WEBHOOK_URL is not set!')
}
const slack = new IncomingWebhook(process.env.SLACK_WEBHOOK_URL)

/* eslint-disable no-eval */
Expand Down

0 comments on commit c049f2e

Please sign in to comment.