Skip to content

Commit 6ea8ba3

Browse files
authored
Merge pull request #40240 from hashicorp/b-slack-url
.github/workflows: fix slack notification actions
2 parents fb91a38 + d8cda59 commit 6ea8ba3

6 files changed

+12
-15
lines changed

.github/workflows/comments-feed.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
ISSUE_URL: ${{ github.event.issue.html_url }}
3636
ISSUE_TITLE: ${{ github.event.issue.title }}
3737
with:
38-
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
38+
webhook: ${{ secrets.FEED_SLACK_WEBHOOK_URL }}
3939
webhook-type: incoming-webhook
4040
payload: |
4141
{

.github/workflows/label-notifications.yml

+3-4
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,12 @@ jobs:
2424
uses: slackapi/slack-github-action@485a9d42d3a73031f12ec201c457e2162c45d02d # v2.0.0
2525
env:
2626
ISSUE_TITLE: ${{ toJSON(github.event.issue.title || github.event.pull_request.title) }}
27-
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
2827
with:
29-
channel-id: ${{ secrets.SLACK_CHANNEL }}
30-
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
31-
webhook-type: incoming-webhook
28+
method: chat.postMessage
29+
token: ${{ secrets.SLACK_BOT_TOKEN }}
3230
payload: |
3331
{
32+
"channel" : "${{ secrets.SLACK_CHANNEL }}",
3433
"blocks": [
3534
{
3635
"type": "section",

.github/workflows/post_publish.yml

+3-5
Original file line numberDiff line numberDiff line change
@@ -107,14 +107,12 @@ jobs:
107107
- name: Send Slack Notification Upon Failure
108108
if: ${{ failure() }}
109109
uses: slackapi/slack-github-action@485a9d42d3a73031f12ec201c457e2162c45d02d # v2.0.0
110-
env:
111-
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
112110
with:
113-
channel-id: ${{ secrets.SLACK_CHANNEL }}
114-
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
115-
webhook-type: incoming-webhook
111+
method: chat.postMessage
112+
token: ${{ secrets.SLACK_BOT_TOKEN }}
116113
payload: |
117114
{
115+
"channel" : "${{ secrets.SLACK_CHANNEL }}",
118116
"blocks": [
119117
{
120118
"type": "section",

.github/workflows/pull_request_feed.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
MERGED_BY_URL: ${{ github.event.pull_request.merged_by.html_url }}
3737
MERGED_BY_LOGIN: ${{ github.event.pull_request.merged_by.login }}
3838
with:
39-
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
39+
webhook: ${{ secrets.FEED_SLACK_WEBHOOK_URL }}
4040
webhook-type: incoming-webhook
4141
payload: |
4242
{
@@ -61,7 +61,7 @@ jobs:
6161
PR_AUTHOR_URL: ${{ github.event.pull_request.user.html_url }}
6262
PR_AUTHOR_LOGIN: ${{ github.event.pull_request.user.login }}
6363
with:
64-
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
64+
webhook: ${{ secrets.FEED_SLACK_WEBHOOK_URL }}
6565
webhook-type: incoming-webhook
6666
payload: |
6767
{
@@ -85,7 +85,7 @@ jobs:
8585
PR_AUTHOR_URL: ${{ github.event.pull_request.user.html_url }}
8686
PR_AUTHOR_LOGIN: ${{ github.event.pull_request.user.login }}
8787
with:
88-
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
88+
webhook: ${{ secrets.FEED_SLACK_WEBHOOK_URL }}
8989
webhook-type: incoming-webhook
9090
payload: |
9191
{

.github/workflows/pull_request_review.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
PR_HTML_URL: ${{ github.event.pull_request.html_url }}
3636
PR_TITLE: ${{ github.event.pull_request.title }}
3737
with:
38-
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
38+
webhook: ${{ secrets.FEED_SLACK_WEBHOOK_URL }}
3939
webhook-type: incoming-webhook
4040
payload: |
4141
{

.github/workflows/release-tag.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
id: slack
1212
uses: slackapi/slack-github-action@485a9d42d3a73031f12ec201c457e2162c45d02d # v2.0.0
1313
with:
14-
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
14+
webhook: ${{ secrets.FEED_SLACK_WEBHOOK_URL }}
1515
webhook-type: incoming-webhook
1616
payload: |
1717
{

0 commit comments

Comments
 (0)