Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 9e41e35

Browse files
authoredSep 27, 2024
Merge branch 'main' into docs/add-uv-documentation
2 parents 15ef835 + bb57141 commit 9e41e35

File tree

609 files changed

+13419
-7600
lines changed

Some content is hidden

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

609 files changed

+13419
-7600
lines changed
 

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

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@ inputs:
88
slack_token:
99
description: Slack token
1010
required: true
11+
message:
12+
description: The message to send to Slack
13+
default: The last '${{ github.workflow }}' run failed. See ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
14+
required: false
15+
color:
16+
description: The color of the Slack message
17+
default: failure
18+
required: false
1119

1220
runs:
1321
using: composite
@@ -17,5 +25,5 @@ runs:
1725
with:
1826
channel: ${{ inputs.slack_channel_id }}
1927
bot-token: ${{ inputs.slack_token }}
20-
color: failure
21-
text: The last '${{ github.workflow }}' run failed. See ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
28+
color: ${{ inputs.color }}
29+
text: ${{ inputs.message }}

‎.github/workflows/alert-changed-branch-protections.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,19 @@ jobs:
3838
id: compare
3939
run: |
4040
# Compare the fetched branch protections with the committed ones
41-
git diff --no-index .github/branch_protection_settings/${{ matrix.branch }}.json ${{ matrix.branch }}-actual.json
41+
git diff --no-index .github/branch_protection_settings/${{ matrix.branch }}.json ${{ matrix.branch }}-actual.json || echo "diff_failed=true" >> $GITHUB_ENV
42+
43+
- name: Set failure message
44+
if: env.diff_failed == 'true'
45+
run: |
46+
message="Alert due to changes in branch protections for ${{ matrix.branch }}. Please review the changes and ensure they are intentional. If valid, update the branch protection settings in .github/branch_protection_settings/${{ matrix.branch }}.json to match the diff in this workflow."
47+
echo "failure_message=$message" >> $GITHUB_ENV
48+
echo "$message"
4249
4350
- uses: ./.github/actions/slack-alert
44-
if: ${{ failure() && github.event_name != 'workflow_dispatch' }}
51+
if: ${{ env.diff_failed == 'true' && github.event_name != 'workflow_dispatch' }}
4552
with:
4653
slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }}
4754
slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }}
55+
message: ${{ env.failure_message }}
56+
color: purple

0 commit comments

Comments
 (0)
Please sign in to comment.