Skip to content

Commit 3a40f20

Browse files
authored
Merge pull request #38988 from github/repo-sync
Repo sync
2 parents 1c507c9 + a06384b commit 3a40f20

File tree

20 files changed

+68
-286
lines changed

20 files changed

+68
-286
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/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

.github/workflows/reviewers-docs-engineering.yml

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

5353
- name: Add docs engineering as a reviewer
54-
run: |
55-
gh pr edit $PR --add-reviewer github/docs-engineering --add-label reviewers-docs-engineering
54+
uses: ./.github/actions/retry-command
55+
with:
56+
command: gh pr edit $PR --add-reviewer github/docs-engineering --add-label reviewers-docs-engineering

.github/workflows/reviewers-legal.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,9 @@ jobs:
5454

5555
- name: Add legal as a reviewer
5656
if: steps.checkContentType.outputs.containsContentType == 'true'
57+
uses: ./.github/actions/retry-command
5758
env:
5859
GH_TOKEN: ${{ secrets.DOCS_BOT_PAT_BASE }}
5960
PR: ${{ github.event.pull_request.html_url }}
60-
run: |
61-
gh pr edit $PR --add-reviewer github/legal-product --add-label reviewers-legal
61+
with:
62+
command: gh pr edit $PR --add-reviewer github/legal-product --add-label reviewers-legal

content/code-security/code-scanning/managing-code-scanning-alerts/resolving-code-scanning-alerts.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,3 @@ You may have multiple code scanning configurations on a single repository. When
136136
* [AUTOTITLE](/code-security/code-scanning/managing-code-scanning-alerts/triaging-code-scanning-alerts-in-pull-requests)
137137
* [AUTOTITLE](/code-security/code-scanning/enabling-code-scanning/configuring-default-setup-for-code-scanning)
138138
* [AUTOTITLE](/code-security/code-scanning/integrating-with-code-scanning/about-integration-with-code-scanning)
139-
{%- ifversion copilot-hadron %}
140-
* [AUTOTITLE](/copilot/using-github-copilot/using-github-copilot-for-pull-requests/using-copilot-to-help-you-work-on-a-pull-request)
141-
{%- endif %}

content/code-security/code-scanning/managing-code-scanning-alerts/responsible-use-autofix-code-scanning.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,6 @@ The best way to mitigate the limitations of suggestions from {% data variables.c
115115

116116
It is important to remember that the author of a pull request retains responsibility for how they respond to review comments and suggested code changes, whether proposed by colleagues or automated tools. Developers should always look at suggestions for code changes critically. If needed, they should edit the suggested changes to ensure that the resulting code and application are correct, secure, meet performance criteria, and satisfy all other functional and non-functional requirements for the application.
117117

118-
{% data reusables.rai.code-scanning.copilot-workspaces-prs-autofix-note %}
119-
120118
## Next steps
121119

122120
* [AUTOTITLE](/code-security/code-scanning/managing-code-scanning-alerts/about-code-scanning-alerts)

content/code-security/code-scanning/managing-code-scanning-alerts/triaging-code-scanning-alerts-in-pull-requests.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,6 @@ Each {% data variables.copilot.copilot_autofix_short %} suggestion demonstrates
142142
1. Click **Edit** to display the editing options and select your preferred method.
143143
* Under **Edit with {% data variables.product.prodname_cli %}**, follow the instructions for checking out the pull request locally and applying the suggested fix.
144144
* Select **Edit FILENAME** to edit the file directly on {% data variables.product.prodname_dotcom %} with the suggested fix applied.
145-
146-
{% data reusables.rai.code-scanning.copilot-workspaces-prs-autofix-note %}
147-
148145
1. Optionally, if you prefer to apply the fix on a local repository or branch, select the {% octicon "copy" aria-hidden="true" aria-label="copy" %} dropdown menu on the suggestion.
149146
* Select **View autofix patch** to display instructions for applying the suggested fix to any local repository or branch.
150147
* Select **Copy modified line LINE_NUMBER** to copy a specific line of the suggestion.
@@ -169,9 +166,3 @@ An alternative way of closing an alert is to dismiss it. You can dismiss an aler
169166
{% data reusables.code-scanning.false-positive-fix-codeql %}
170167

171168
For more information about dismissing alerts, see [AUTOTITLE](/code-security/code-scanning/managing-code-scanning-alerts/resolving-code-scanning-alerts#dismissing--alerts).
172-
173-
## Further reading
174-
175-
{%- ifversion copilot-hadron %}
176-
* [AUTOTITLE](/copilot/using-github-copilot/using-github-copilot-for-pull-requests/using-copilot-to-help-you-work-on-a-pull-request)
177-
{%- endif %}

content/copilot/about-github-copilot/github-copilot-features.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,7 @@ AI-generated code review suggestions to help you write better code. See [AUTOTIT
3838

3939
### {% data variables.copilot.copilot_for_prs %}
4040

41-
AI-generated summaries of the changes that were made in a pull request, which files they impact, and what a reviewer should focus on when they conduct their review. See [AUTOTITLE](/copilot/using-github-copilot/using-github-copilot-for-pull-requests/creating-a-pull-request-summary-with-github-copilot).
42-
43-
### {% data variables.copilot.copilot_workspace %} ({% data variables.release-phases.public_preview %})
44-
45-
A {% data variables.product.prodname_copilot_short %}-enabled environment for refining your pull requests, validating changes, and integrating suggestions from reviewers. See [AUTOTITLE](/copilot/using-github-copilot/using-github-copilot-for-pull-requests/using-copilot-to-help-you-work-on-a-pull-request).
41+
AI-generated summaries of the changes that were made in a pull request, which files they impact, and what a reviewer should focus on when they conduct their review. See [AUTOTITLE](/copilot/using-github-copilot/creating-a-pull-request-summary-with-github-copilot).
4642

4743
### {% data variables.copilot.copilot_autocomplete_pr %} ({% data variables.release-phases.public_preview %})
4844

content/copilot/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ shortTitle: '{% data variables.product.prodname_copilot %}'
44
intro: 'You can use {% data variables.product.prodname_copilot %} to enhance your productivity and assist as you work on code.'
55
redirect_from:
66
- /github/copilot
7+
- /copilot/using-github-copilot/using-github-copilot-for-pull-requests/using-copilot-to-help-you-work-on-a-pull-request
78
changelog:
89
label: copilot
910
introLinks:

0 commit comments

Comments
 (0)