Skip to content

Commit

Permalink
fix(action): Skip notification when inputs blank
Browse files Browse the repository at this point in the history
Don't call slackapi/slack-github-action when no Slack bot token or
channel ID is passed since both are necessary to issue a Slack
notification. This occurs in pull requests from forks, such as those
generated by Forking Renovate, because GitHub Actions does not allow
forks access to secrets for security purposes.
  • Loading branch information
Kurt-von-Laven committed Aug 1, 2023
1 parent 0348cfd commit fab0ccc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ runs:
shell: bash
working-directory: "${{ github.action_path }}"
- name: Send Slack notification.
if: inputs.bot-token != '' && inputs.channel-id != ''
uses: slackapi/slack-github-action@v1.23.0
with:
channel-id: ${{ inputs.channel-id }}
Expand Down

0 comments on commit fab0ccc

Please sign in to comment.