Skip to content

Commit

Permalink
fix(*): replace env where defined in src
Browse files Browse the repository at this point in the history
  • Loading branch information
evanlindsey committed Sep 27, 2024
1 parent 80517e6 commit 42a53b6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35378,8 +35378,9 @@ try {
}
const slack = new IncomingWebhook(process.env.SLACK_WEBHOOK_URL)

/* eslint-disable no-eval */
const disableEval = !!core.getInput('disable_eval')
// env.* to be used in message text template
const env = process.env
const envsubst = str => (disableEval ? str : eval(`\`${str}\``))

const channel = envsubst(core.getInput('channel'))
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "simple-slack-notify",
"version": "1.3.1",
"version": "1.3.2",
"description": "Slack notification action that just works",
"author": "The Actions Org",
"license": "MIT",
Expand Down
3 changes: 2 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ try {
}
const slack = new IncomingWebhook(process.env.SLACK_WEBHOOK_URL)

/* eslint-disable no-eval */
const disableEval = !!core.getInput('disable_eval')
// env.* to be used in message text template
const env = process.env
const envsubst = str => (disableEval ? str : eval(`\`${str}\``))

const channel = envsubst(core.getInput('channel'))
Expand Down

0 comments on commit 42a53b6

Please sign in to comment.