Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/actions/retry-command/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: 'Retry command'
description: 'Retries any command with configurable attempts and delay'
inputs:
command:
description: 'The command to retry'
required: true
max_attempts:
description: 'Maximum number of retry attempts'
required: false
default: '8'
delay:
description: 'Delay between attempts in seconds'
required: false
default: '15'

runs:
using: 'composite'
steps:
- name: Retry command
shell: bash
run: |
# Generic retry function: configurable attempts and delay
retry_command() {
local max_attempts=${{ inputs.max_attempts }}
local delay=${{ inputs.delay }}
local attempt=1
local command="${{ inputs.command }}"

while [ $attempt -le $max_attempts ]; do
echo "Attempt $attempt/$max_attempts: Running command..."
echo "Command: $command"
if eval "$command"; then
echo "Command succeeded on attempt $attempt"
return 0
else
echo "Attempt $attempt failed"
if [ $attempt -lt $max_attempts ]; then
echo "Waiting $delay seconds before retry..."
sleep $delay
fi
fi
attempt=$((attempt + 1))
done

echo "Command failed after $max_attempts attempts"
return 1
}

retry_command
5 changes: 3 additions & 2 deletions .github/workflows/reviewers-content-systems.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,6 @@ jobs:
uses: actions/checkout@v4

- name: Add content systems as a reviewer
run: |
gh pr edit $PR --add-reviewer github/docs-content-systems --add-label reviewers-content-systems
uses: ./.github/actions/retry-command
with:
command: gh pr edit $PR --add-reviewer github/docs-content-systems --add-label reviewers-content-systems
5 changes: 3 additions & 2 deletions .github/workflows/reviewers-dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,6 @@ jobs:
uses: actions/checkout@v4

- name: Add dependabot as a reviewer
run: |
gh pr edit $PR --add-reviewer github/dependabot-updates-reviewers --add-label reviewers-dependabot
uses: ./.github/actions/retry-command
with:
command: gh pr edit $PR --add-reviewer github/dependabot-updates-reviewers --add-label reviewers-dependabot
5 changes: 3 additions & 2 deletions .github/workflows/reviewers-docs-engineering.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,6 @@ jobs:
uses: actions/checkout@v4

- name: Add docs engineering as a reviewer
run: |
gh pr edit $PR --add-reviewer github/docs-engineering --add-label reviewers-docs-engineering
uses: ./.github/actions/retry-command
with:
command: gh pr edit $PR --add-reviewer github/docs-engineering --add-label reviewers-docs-engineering
5 changes: 3 additions & 2 deletions .github/workflows/reviewers-legal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@ jobs:

- name: Add legal as a reviewer
if: steps.checkContentType.outputs.containsContentType == 'true'
uses: ./.github/actions/retry-command
env:
GH_TOKEN: ${{ secrets.DOCS_BOT_PAT_BASE }}
PR: ${{ github.event.pull_request.html_url }}
run: |
gh pr edit $PR --add-reviewer github/legal-product --add-label reviewers-legal
with:
command: gh pr edit $PR --add-reviewer github/legal-product --add-label reviewers-legal
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,3 @@ You may have multiple code scanning configurations on a single repository. When
* [AUTOTITLE](/code-security/code-scanning/managing-code-scanning-alerts/triaging-code-scanning-alerts-in-pull-requests)
* [AUTOTITLE](/code-security/code-scanning/enabling-code-scanning/configuring-default-setup-for-code-scanning)
* [AUTOTITLE](/code-security/code-scanning/integrating-with-code-scanning/about-integration-with-code-scanning)
{%- ifversion copilot-hadron %}
* [AUTOTITLE](/copilot/using-github-copilot/using-github-copilot-for-pull-requests/using-copilot-to-help-you-work-on-a-pull-request)
{%- endif %}
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,6 @@ The best way to mitigate the limitations of suggestions from {% data variables.c

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.

{% data reusables.rai.code-scanning.copilot-workspaces-prs-autofix-note %}

## Next steps

* [AUTOTITLE](/code-security/code-scanning/managing-code-scanning-alerts/about-code-scanning-alerts)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,6 @@ Each {% data variables.copilot.copilot_autofix_short %} suggestion demonstrates
1. Click **Edit** to display the editing options and select your preferred method.
* Under **Edit with {% data variables.product.prodname_cli %}**, follow the instructions for checking out the pull request locally and applying the suggested fix.
* Select **Edit FILENAME** to edit the file directly on {% data variables.product.prodname_dotcom %} with the suggested fix applied.

{% data reusables.rai.code-scanning.copilot-workspaces-prs-autofix-note %}

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.
* Select **View autofix patch** to display instructions for applying the suggested fix to any local repository or branch.
* Select **Copy modified line LINE_NUMBER** to copy a specific line of the suggestion.
Expand All @@ -169,9 +166,3 @@ An alternative way of closing an alert is to dismiss it. You can dismiss an aler
{% data reusables.code-scanning.false-positive-fix-codeql %}

For more information about dismissing alerts, see [AUTOTITLE](/code-security/code-scanning/managing-code-scanning-alerts/resolving-code-scanning-alerts#dismissing--alerts).

## Further reading

{%- ifversion copilot-hadron %}
* [AUTOTITLE](/copilot/using-github-copilot/using-github-copilot-for-pull-requests/using-copilot-to-help-you-work-on-a-pull-request)
{%- endif %}
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,7 @@ AI-generated code review suggestions to help you write better code. See [AUTOTIT

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

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).

### {% data variables.copilot.copilot_workspace %} ({% data variables.release-phases.public_preview %})

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).
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).

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

Expand Down
1 change: 1 addition & 0 deletions content/copilot/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ shortTitle: '{% data variables.product.prodname_copilot %}'
intro: 'You can use {% data variables.product.prodname_copilot %} to enhance your productivity and assist as you work on code.'
redirect_from:
- /github/copilot
- /copilot/using-github-copilot/using-github-copilot-for-pull-requests/using-copilot-to-help-you-work-on-a-pull-request
changelog:
label: copilot
introLinks:
Expand Down
2 changes: 0 additions & 2 deletions content/copilot/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ topics:

You can use {% data variables.product.prodname_copilot_short %} to get answers to coding-related questions, such as how best to code something, how to fix a bug, or how someone else's code works. For full details of what {% data variables.product.prodname_copilot_short %} can do, see [AUTOTITLE](/copilot/about-github-copilot/what-is-github-copilot).

If you have access to {% data variables.copilot.copilot_workspace %}, {% data variables.product.prodname_copilot_short %} can also help you when you are editing files in a pull request on the {% data variables.product.github %} website by offering you code completion suggestions. For more information about {% data variables.copilot.copilot_workspace %}, see [AUTOTITLE](/copilot/using-github-copilot/using-github-copilot-for-pull-requests/using-copilot-to-help-you-work-on-a-pull-request).

Instructions for using {% data variables.product.prodname_copilot_short %} differ depending on where you are using it. This version of the quickstart is for {% data variables.product.github %}. Click the tabs above for instructions on using {% data variables.product.prodname_copilot_short %} in other environments.

{% ifversion fpt %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,6 @@ Where possible, {% data variables.product.prodname_copilot_short %}'s feedback i

If you're happy with the changes, you can accept a single suggestion from {% data variables.product.prodname_copilot_short %} and commit it, or accept a group of suggestions together in a single commit. For more information, see [AUTOTITLE](/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/incorporating-feedback-in-your-pull-request).

If you want to validate {% data variables.product.prodname_copilot_short %}'s suggested changes (for example by running automated tests or your linter), or if you want to make modifications before committing the suggested changes, click the **Open in Workspace** button. For more information, see [AUTOTITLE](/copilot/using-github-copilot/using-github-copilot-for-pull-requests/using-copilot-to-help-you-work-on-a-pull-request).

## Providing feedback on {% data variables.product.prodname_copilot_short %}'s reviews

You can provide feedback on {% data variables.product.prodname_copilot_short %}'s comments directly within each comment. We use this information to improve the product and the quality of {% data variables.product.prodname_copilot_short %}'s suggestions.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ topics:
- Copilot
product: '{% data reusables.gated-features.copilot-free-availability %}'
redirect_from:
- /copilot/using-github-copilot/creating-a-pull-request-summary-with-github-copilot
- /copilot/using-github-copilot/using-github-copilot-for-pull-requests/creating-a-pull-request-summary-with-github-copilot
- /copilot/github-copilot-enterprise/copilot-pull-request-summaries/creating-a-pull-request-summary-with-github-copilot
- /copilot/github-copilot-enterprise/copilot-pull-request-summaries
- /copilot/using-github-copilot/using-github-copilot-for-pull-requests
---

## About {% data variables.copilot.copilot_for_prs %}
Expand Down
2 changes: 1 addition & 1 deletion content/copilot/using-github-copilot/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ children:
- /using-extensions-to-integrate-external-tools-with-copilot-chat
- /ai-models
- /finding-public-code-that-matches-github-copilot-suggestions
- /using-github-copilot-for-pull-requests
- /creating-a-pull-request-summary-with-github-copilot
- /using-github-copilot-to-create-issues
- /guides-on-using-github-copilot
redirect_from:
Expand Down

This file was deleted.

Loading
Loading