Skip to content

Commit 5b16cf1

Browse files
authored
Fix workflows sending messages to Slack (#5168)
1 parent 59ed4a3 commit 5b16cf1

File tree

4 files changed

+8
-9
lines changed

4 files changed

+8
-9
lines changed

.github/workflows/ci_cd.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1449,7 +1449,6 @@ jobs:
14491449
- name: Send report
14501450
uses: slackapi/slack-github-action@v2
14511451
with:
1452+
webhook: ${{ secrets.SLACK_OV_ALERTS_WEBHOOK_URL }}
1453+
webhook-type: incoming-webhook
14521454
payload: ${{ steps.report.outputs.payload }}
1453-
env:
1454-
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_OV_ALERTS_WEBHOOK_URL }}
1455-
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK

.github/workflows/discussion_ping.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ jobs:
1616
discussion_title: ${{ format('{0}', github.event.discussion.title) }}
1717
discussion_author: ${{ github.event.discussion.user.login }}
1818
discussion_repo: ${{ github.event.repository.full_name }}
19-
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
20-
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
2119
steps:
2220
- name: Send notification for new discussion
2321
id: slack
2422
uses: slackapi/slack-github-action@v2
2523
with:
24+
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
25+
webhook-type: incoming-webhook
2626
payload: |
2727
{
2828
"text": "New discussion opened by ${{ env.discussion_author }} in ${{ env.discussion_repo }}: #${{ env.discussion_number }} - ${{ env.discussion_title }}",

.github/workflows/pr_limit_reminders.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ jobs:
3333
env:
3434
pr_count: ${{ needs.analyze-user-prs.outputs.pr_count }}
3535
slack_id: ${{ needs.analyze-user-prs.outputs.slack_id }}
36-
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_DM_WEBHOOK_URL }}
37-
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
3836
steps:
3937
- name: Set required review count
4038
run: |
@@ -43,6 +41,8 @@ jobs:
4341
id: slack
4442
uses: slackapi/slack-github-action@v2
4543
with:
44+
webhook: ${{ secrets.SLACK_DM_WEBHOOK_URL }}
45+
webhook-type: incoming-webhook
4646
# Note: We cannot use the YAML folded chomping block syntax here (`>`) because
4747
# GitHub Actions does not support it (they only support a subset of YAML):
4848
# https://github.com/actions/runner/issues/418#issuecomment-612928525

.github/workflows/pr_ping.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ jobs:
1919
runs-on: ubuntu-latest
2020
env:
2121
EVENT_ACTION: ${{ github.event.action }}
22-
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
23-
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
2422
steps:
2523
- name: Write payload to file
2624
uses: actions/github-script@v7
@@ -53,4 +51,6 @@ jobs:
5351
- name: Send Slack notification
5452
uses: slackapi/slack-github-action@v2
5553
with:
54+
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
55+
webhook-type: incoming-webhook
5656
payload-file-path: /tmp/pr_ping_payload.json

0 commit comments

Comments
 (0)