Skip to content

Commit e8a6382

Browse files
authored
Merge pull request #44670 from github/repo-sync
Repo sync
2 parents d550c3d + d1271fa commit e8a6382

68 files changed

Lines changed: 935 additions & 345 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/actions/slack-alert/action.yml

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,27 @@ name: Send Slack notification if workflow fails
22
description: Send Slack notification if workflow fails
33

44
inputs:
5-
slack_channel_id:
6-
description: Slack channel ID
7-
required: true
85
slack_token:
96
description: Slack token
107
required: true
8+
slack_channel_id:
9+
description: Slack channel ID. Defaults to the docs-alerts channel (CG5MJHMB2).
10+
default: CG5MJHMB2 # docs-alerts
11+
required: false
1112
message:
1213
description: The message to send to Slack
1314
default: The last '${{ github.workflow }}' run failed. See ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
1415
required: false
15-
color:
16-
description: The color of the Slack message
17-
default: failure
18-
required: false
1916

2017
runs:
2118
using: composite
2219
steps:
2320
- name: Send Slack notification if workflow fails
24-
uses: someimportantcompany/github-actions-slack-message@a975b440de2bcef178d451cc70d4c1161b5a30cd
21+
uses: slackapi/slack-github-action@45a88b9581bfab2566dc881e2cd66d334e621e2c # v3.0.3
2522
with:
26-
channel: ${{ inputs.slack_channel_id }}
27-
bot-token: ${{ inputs.slack_token }}
28-
color: ${{ inputs.color }}
29-
text: ${{ inputs.message }}
23+
method: chat.postMessage
24+
token: ${{ inputs.slack_token }}
25+
errors: true
26+
payload: |
27+
channel: ${{ toJSON(inputs.slack_channel_id) }}
28+
text: ${{ toJSON(inputs.message) }}

.github/workflows/benchmark-pages.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@ jobs:
161161
- uses: ./.github/actions/slack-alert
162162
if: ${{ failure() && github.event_name != 'workflow_dispatch' }}
163163
with:
164-
slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }}
165164
slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }}
166165

167166
- uses: ./.github/actions/create-workflow-failure-issue

.github/workflows/close-on-invalid-label.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,4 @@ jobs:
4444
- uses: ./.github/actions/slack-alert
4545
if: ${{ failure() && github.event_name != 'pull_request_target' }}
4646
with:
47-
slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }}
4847
slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }}

.github/workflows/codeql.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ jobs:
3939
- uses: ./.github/actions/slack-alert
4040
if: ${{ failure() && github.event_name != 'pull_request' }}
4141
with:
42-
slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }}
4342
slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }}
4443

4544
- uses: ./.github/actions/create-workflow-failure-issue

.github/workflows/confirm-internal-staff-work-in-docs.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,17 +75,22 @@ jobs:
7575
7676
- name: Send Slack notification if a GitHub employee who isn't on the docs team opens an issue in public
7777
if: ${{ steps.membership_check.outputs.did_warn && github.repository == 'github/docs' }}
78-
uses: someimportantcompany/github-actions-slack-message@a975b440de2bcef178d451cc70d4c1161b5a30cd
78+
uses: slackapi/slack-github-action@45a88b9581bfab2566dc881e2cd66d334e621e2c # v3.0.3
79+
env:
80+
SLACK_MESSAGE: <@${{ github.actor }}> opened https://github.com/github/docs/issues/${{ github.event.number || github.event.issue.number }} publicly on the github/docs repo instead of a private repo. They have been notified via a new issue in the private repo to confirm this was intentional.
81+
SLACK_CHANNEL_ID: ${{ secrets.DOCS_OPEN_SOURCE_SLACK_CHANNEL_ID }}
7982
with:
80-
channel: ${{ secrets.DOCS_OPEN_SOURCE_SLACK_CHANNEL_ID }}
81-
bot-token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }}
82-
text: <@${{github.actor}}> opened https://github.com/github/docs/issues/${{ github.event.number || github.event.issue.number }} publicly on the github/docs repo instead of a private repo. They have been notified via a new issue in the private repo to confirm this was intentional.
83+
method: chat.postMessage
84+
token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }}
85+
errors: true
86+
payload: |
87+
channel: ${{ toJSON(env.SLACK_CHANNEL_ID) }}
88+
text: ${{ toJSON(env.SLACK_MESSAGE) }}
8389
8490
- name: Check out repo
8591
if: ${{ failure() && github.event_name != 'pull_request_target' }}
8692
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
8793
- uses: ./.github/actions/slack-alert
8894
if: ${{ failure() && github.event_name != 'pull_request_target' }}
8995
with:
90-
slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }}
9196
slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }}

.github/workflows/content-pipelines.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,6 @@ jobs:
190190
- uses: ./.github/actions/slack-alert
191191
if: ${{ failure() && github.event_name != 'workflow_dispatch' }}
192192
with:
193-
slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }}
194193
slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }}
195194

196195
- uses: ./.github/actions/create-workflow-failure-issue

.github/workflows/copy-api-issue-to-internal.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,5 +77,4 @@ jobs:
7777
- uses: ./.github/actions/slack-alert
7878
if: ${{ failure() && github.event_name != 'workflow_dispatch' && github.repository == 'github/docs-internal' }}
7979
with:
80-
slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }}
8180
slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }}

.github/workflows/create-changelog-pr.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,6 @@ jobs:
162162
- uses: ./.github/actions/slack-alert
163163
if: ${{ failure() && github.event_name != 'workflow_dispatch' }}
164164
with:
165-
slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }}
166165
slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }}
167166

168167
- uses: ./.github/actions/create-workflow-failure-issue

.github/workflows/delete-orphan-translation-files.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,6 @@ jobs:
159159
- uses: ./.github/actions/slack-alert
160160
if: ${{ failure() && github.event_name != 'workflow_dispatch' }}
161161
with:
162-
slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }}
163162
slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }}
164163

165164
- uses: ./.github/actions/create-workflow-failure-issue

.github/workflows/docs-review-collect.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ jobs:
4545
- uses: ./.github/actions/slack-alert
4646
if: ${{ failure() && github.event_name != 'workflow_dispatch' }}
4747
with:
48-
slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }}
4948
slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }}
5049

5150
- uses: ./.github/actions/create-workflow-failure-issue

0 commit comments

Comments
 (0)