Skip to content

The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:

Check webhook secret exists (#75226)

Roman Abdulmanove0bbcb044f24
diff --git a/.github/workflows/team-issues-slack-notification.yml b/.github/workflows/team-issues-slack-notification.yml
index 7ad752eed34..772eb24e636 100644
--- a/.github/workflows/team-issues-slack-notification.yml
+++ b/.github/workflows/team-issues-slack-notification.yml
@@ -28,7 +28,19 @@ jobs:
team_name=${team_label#*.Team/}
echo $team_name
echo "team_name=${team_name^^}_SLACK_ISSUES_WEBHOOK_URL" >> "$GITHUB_OUTPUT"
+ - name: Check webhook secret exists
+ id: check_secret
+ env:
+ WEBHOOK_URL: ${{ secrets[steps.team_name.outputs.team_name] }}
+ run: |
+ if [ -z "$WEBHOOK_URL" ]; then
+ echo "Secret ${{ steps.team_name.outputs.team_name }} is not set, skipping Slack notification"
+ echo "exists=false" >> "$GITHUB_OUTPUT"
+ else
+ echo "exists=true" >> "$GITHUB_OUTPUT"
+ fi
- name: Send the issue ${{ github.event.issue.number }} to Slack
+ if: steps.check_secret.outputs.exists == 'true'
id: slack
uses: slackapi/slack-github-action@45a88b9581bfab2566dc881e2cd66d334e621e2c # v3.0.3
with: