Skip to content

Commit 2a7d934

Browse files
Merge branch 'main' into discussions-edits
2 parents a4bc962 + 4d7dc1a commit 2a7d934

File tree

216 files changed

+5593
-2764
lines changed

Some content is hidden

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

216 files changed

+5593
-2764
lines changed
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: 'Retry command'
2+
description: 'Retries any command with configurable attempts and delay'
3+
inputs:
4+
command:
5+
description: 'The command to retry'
6+
required: true
7+
max_attempts:
8+
description: 'Maximum number of retry attempts'
9+
required: false
10+
default: '8'
11+
delay:
12+
description: 'Delay between attempts in seconds'
13+
required: false
14+
default: '15'
15+
16+
runs:
17+
using: 'composite'
18+
steps:
19+
- name: Retry command
20+
shell: bash
21+
run: |
22+
# Generic retry function: configurable attempts and delay
23+
retry_command() {
24+
local max_attempts=${{ inputs.max_attempts }}
25+
local delay=${{ inputs.delay }}
26+
local attempt=1
27+
local command="${{ inputs.command }}"
28+
29+
while [ $attempt -le $max_attempts ]; do
30+
echo "Attempt $attempt/$max_attempts: Running command..."
31+
echo "Command: $command"
32+
if eval "$command"; then
33+
echo "Command succeeded on attempt $attempt"
34+
return 0
35+
else
36+
echo "Attempt $attempt failed"
37+
if [ $attempt -lt $max_attempts ]; then
38+
echo "Waiting $delay seconds before retry..."
39+
sleep $delay
40+
fi
41+
fi
42+
attempt=$((attempt + 1))
43+
done
44+
45+
echo "Command failed after $max_attempts attempts"
46+
return 1
47+
}
48+
49+
retry_command

.github/workflows/check-broken-links-github-github.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
# need to use a token from a user with access to github/github for this step
2121
GITHUB_TOKEN: ${{ secrets.DOCS_BOT_PAT_BASE }}
2222
REPORT_AUTHOR: docs-bot
23-
REPORT_LABEL: github github broken link report
23+
REPORT_LABEL: github github broken link report,workflow-generated
2424
REPORT_REPOSITORY: github/docs-content
2525
steps:
2626
- name: Checkout

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
4646
- name: Create an issue in the docs-content repo
4747
run: |
48-
new_issue_url="$(gh issue create --title "$ISSUE_TITLE" --body "$ISSUE_BODY" --repo github/docs-content)"
48+
new_issue_url="$(gh issue create --title "$ISSUE_TITLE" --body "$ISSUE_BODY" --repo github/docs-content --label "workflow-generated")"
4949
echo 'NEW_ISSUE='$new_issue_url >> $GITHUB_ENV
5050
env:
5151
GITHUB_TOKEN: ${{secrets.DOCS_BOT_PAT_BASE}}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ jobs:
130130
--body '👋 humans. This PR was generated from docs-internal/.github/workflows/delete-orphan-translation-files.yml.
131131
' \
132132
--repo "${{ matrix.language_repo }}" \
133+
--label "workflow-generated" \
133134
--head=$branch_name
134135
echo "Merge created PR..."
135136
retry_command gh pr merge --merge --auto --delete-branch "$branch_name"

.github/workflows/generate-code-scanning-query-lists.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ jobs:
152152
gh pr create \
153153
--title "Update CodeQL query tables" \
154154
--repo github/docs-internal \
155-
--label "codeql-query-tables,skip FR board,ready-for-doc-review" \
155+
--label "codeql-query-tables,skip FR board,ready-for-doc-review,workflow-generated" \
156156
--body '👋 humans. This PR updates the **CodeQL query table reusables** with the latest changes in preparation for the next **CodeQL CLI** release.
157157
158158
No action is required from the first responder for the Docs content team. This PR will be reviewed and merged by the Code scanning and GHAS focus team as part of the next release of CodeQL CLI. (Synced from codeql@${{ steps.codeql.outputs.OPENAPI_COMMIT_SHA }})

.github/workflows/moda-allowed-ips.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ jobs:
4949
gh pr create \
5050
--title "Update list of allowed IPs" \
5151
--body 'This PR updates the list of allowed IPs in Moda. It is automatically generated.' \
52+
--label "workflow-generated" \
5253
--head=$branchname
5354
echo "Pull request created"
5455

.github/workflows/orphaned-features-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ jobs:
9797
--title "Delete orphaned features ($date)" \
9898
--body "$body" \
9999
--repo github/docs-internal \
100-
--label docs-content-fr
100+
--label docs-content-fr,workflow-generated
101101
102102
- uses: ./.github/actions/slack-alert
103103
if: ${{ failure() && github.event_name == 'schedule' }}

.github/workflows/orphaned-files-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ jobs:
105105
--title "Delete orphaned files ($date)" \
106106
--body "$body" \
107107
--repo github/docs-internal \
108-
--label docs-content-fr
108+
--label docs-content-fr,workflow-generated
109109
110110
- uses: ./.github/actions/slack-alert
111111
if: ${{ failure() && github.event_name == 'schedule' }}

.github/workflows/reviewers-content-systems.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,6 @@ jobs:
3939
uses: actions/checkout@v4
4040

4141
- name: Add content systems as a reviewer
42-
run: |
43-
gh pr edit $PR --add-reviewer github/docs-content-systems --add-label reviewers-content-systems
42+
uses: ./.github/actions/retry-command
43+
with:
44+
command: gh pr edit $PR --add-reviewer github/docs-content-systems --add-label reviewers-content-systems

.github/workflows/reviewers-dependabot.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,6 @@ jobs:
4040
uses: actions/checkout@v4
4141

4242
- name: Add dependabot as a reviewer
43-
run: |
44-
gh pr edit $PR --add-reviewer github/dependabot-updates-reviewers --add-label reviewers-dependabot
43+
uses: ./.github/actions/retry-command
44+
with:
45+
command: gh pr edit $PR --add-reviewer github/dependabot-updates-reviewers --add-label reviewers-dependabot

0 commit comments

Comments
 (0)