Skip to content

Commit

Permalink
Fix workflows sending messages to Slack (#5168)
Browse files Browse the repository at this point in the history
  • Loading branch information
krysal authored Nov 15, 2024
1 parent 59ed4a3 commit 5b16cf1
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1449,7 +1449,6 @@ jobs:
- name: Send report
uses: slackapi/slack-github-action@v2
with:
webhook: ${{ secrets.SLACK_OV_ALERTS_WEBHOOK_URL }}
webhook-type: incoming-webhook
payload: ${{ steps.report.outputs.payload }}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_OV_ALERTS_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
4 changes: 2 additions & 2 deletions .github/workflows/discussion_ping.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ jobs:
discussion_title: ${{ format('{0}', github.event.discussion.title) }}
discussion_author: ${{ github.event.discussion.user.login }}
discussion_repo: ${{ github.event.repository.full_name }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
steps:
- name: Send notification for new discussion
id: slack
uses: slackapi/slack-github-action@v2
with:
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
webhook-type: incoming-webhook
payload: |
{
"text": "New discussion opened by ${{ env.discussion_author }} in ${{ env.discussion_repo }}: #${{ env.discussion_number }} - ${{ env.discussion_title }}",
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr_limit_reminders.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ jobs:
env:
pr_count: ${{ needs.analyze-user-prs.outputs.pr_count }}
slack_id: ${{ needs.analyze-user-prs.outputs.slack_id }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_DM_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
steps:
- name: Set required review count
run: |
Expand All @@ -43,6 +41,8 @@ jobs:
id: slack
uses: slackapi/slack-github-action@v2
with:
webhook: ${{ secrets.SLACK_DM_WEBHOOK_URL }}
webhook-type: incoming-webhook
# Note: We cannot use the YAML folded chomping block syntax here (`>`) because
# GitHub Actions does not support it (they only support a subset of YAML):
# https://github.com/actions/runner/issues/418#issuecomment-612928525
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr_ping.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ jobs:
runs-on: ubuntu-latest
env:
EVENT_ACTION: ${{ github.event.action }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
steps:
- name: Write payload to file
uses: actions/github-script@v7
Expand Down Expand Up @@ -53,4 +51,6 @@ jobs:
- name: Send Slack notification
uses: slackapi/slack-github-action@v2
with:
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
webhook-type: incoming-webhook
payload-file-path: /tmp/pr_ping_payload.json

0 comments on commit 5b16cf1

Please sign in to comment.