diff --git a/content/code-security/code-scanning/managing-code-scanning-alerts/resolving-code-scanning-alerts.md b/content/code-security/code-scanning/managing-code-scanning-alerts/resolving-code-scanning-alerts.md index a79088e5c1fb..a518ed78cac3 100644 --- a/content/code-security/code-scanning/managing-code-scanning-alerts/resolving-code-scanning-alerts.md +++ b/content/code-security/code-scanning/managing-code-scanning-alerts/resolving-code-scanning-alerts.md @@ -43,6 +43,7 @@ With a {% data variables.copilot.copilot_enterprise %} license, you can ask {% d {% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-security %} {% data reusables.repositories.sidebar-code-scanning-alerts %} + 1. Click the name of an alert. 1. If {% data variables.copilot.copilot_autofix_short %} can suggest a fix, at the top of the page, click **{% octicon "shield-check" aria-hidden="true" aria-label="shield-check" %} Generate fix**. 1. Once the suggested fix has been generated, at the bottom of the page, you can click **Create PR with fix** to automatically generate a pull request with the suggested fix. @@ -93,6 +94,7 @@ To dismiss alerts: {% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-security %} {% data reusables.repositories.sidebar-code-scanning-alerts %} + 1. If you want to dismiss an alert, it's important to explore the alert first, so that you can choose the correct dismissal reason. Click the alert you'd like to explore. 1. Review the alert, then click **Dismiss alert** and choose, or type, a reason for closing the alert. ![Screenshot of an alert check failure. The "Dismiss alert" button is highlighted in dark orange and the dismiss drop-down displayed. ](/assets/images/help/repository/code-scanning-alert-dropdown-reason.png) @@ -115,6 +117,7 @@ You may have multiple code scanning configurations on a single repository. When {% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-security %} {% data reusables.repositories.sidebar-code-scanning-alerts %} + 1. Under "{% data variables.product.prodname_code_scanning_caps %}", click a {% data variables.product.prodname_code_scanning %} alert. 1. In the "Affected branches" section of the sidebar, click the desired branch. 1. In the "Configurations analyzing" dialog, review details of the configurations that reported this alert on the selected branch. To delete an unwanted configuration for the desired branch, click {% octicon "trash" aria-label="Delete configuration" %}. @@ -128,6 +131,7 @@ You may have multiple code scanning configurations on a single repository. When If you save your changes after accidentally deleting a configuration, re-run the configuration to update the alert. For more information on re-running configurations that use {% data variables.product.prodname_actions %}, see [AUTOTITLE](/actions/managing-workflow-runs/re-running-workflows-and-jobs#re-running-all-the-jobs-in-a-workflow). > [!NOTE] +> > * If you remove all {% data variables.product.prodname_code_scanning %} configurations for the default branch of your repository, the default branch will remain in the "Affected branches" sidebar, but it will not be analyzed by any configurations. > * If you remove all {% data variables.product.prodname_code_scanning %} configurations for any branch other than the default branch of your repository, that branch will be removed from the "Affected branches" sidebar. @@ -136,6 +140,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 %} diff --git a/content/code-security/code-scanning/managing-code-scanning-alerts/triaging-code-scanning-alerts-in-pull-requests.md b/content/code-security/code-scanning/managing-code-scanning-alerts/triaging-code-scanning-alerts-in-pull-requests.md index f7ef03ccc683..8c236a6477e5 100644 --- a/content/code-security/code-scanning/managing-code-scanning-alerts/triaging-code-scanning-alerts-in-pull-requests.md +++ b/content/code-security/code-scanning/managing-code-scanning-alerts/triaging-code-scanning-alerts-in-pull-requests.md @@ -127,6 +127,7 @@ Anyone with push access to a pull request can fix a {% data variables.product.pr When {% data variables.copilot.copilot_autofix_short %} is enabled for a repository, alerts are displayed in pull requests as normal and information from any alerts found by {% data variables.product.prodname_code_scanning %} is automatically sent to the LLM for processing. When LLM analysis is complete, any results are published as comments on relevant alerts. For more information, see [AUTOTITLE](/code-security/code-scanning/managing-code-scanning-alerts/responsible-use-autofix-code-scanning). > [!NOTE] +> > * {% data variables.copilot.copilot_autofix_short %} supports a subset of {% data variables.product.prodname_codeql %} queries. For information about the availability of {% data variables.copilot.copilot_autofix_short %}, see the query tables linked from [AUTOTITLE](/code-security/code-scanning/managing-your-code-scanning-configuration/codeql-query-suites#query-lists-for-the-default-query-suites). > * When analysis is complete, all relevant results are published to the pull request at once. If at least one alert in your pull request has an {% data variables.copilot.copilot_autofix_short %} suggestion, you should assume that the LLM has finished identifying potential fixes for your code. > * On alerts generated from queries that are not supported by {% data variables.copilot.copilot_autofix_short %}, you will see a note telling you that the query is not supported. If a suggestion for a supported query fails to generate, you will see a note on the alert prompting you to try pushing another commit or to contact support. @@ -143,8 +144,6 @@ Each {% data variables.copilot.copilot_autofix_short %} suggestion demonstrates * 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. @@ -171,7 +170,3 @@ An alternative way of closing an alert is to dismiss it. You can dismiss an aler 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 %} diff --git a/content/copilot/about-github-copilot/github-copilot-features.md b/content/copilot/about-github-copilot/github-copilot-features.md index 4ccfccfbc53f..50e26c94a66d 100644 --- a/content/copilot/about-github-copilot/github-copilot-features.md +++ b/content/copilot/about-github-copilot/github-copilot-features.md @@ -40,10 +40,6 @@ AI-generated code review suggestions to help you write better code. See [AUTOTIT 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). - ### {% data variables.copilot.copilot_autocomplete_pr %} ({% data variables.release-phases.public_preview %}) AI-generated text completion to help you write pull request descriptions quickly and accurately. See [AUTOTITLE](/copilot/using-github-copilot/using-copilot-text-completion). diff --git a/content/copilot/quickstart.md b/content/copilot/quickstart.md index aedabe5ecf73..77d436b03ec8 100644 --- a/content/copilot/quickstart.md +++ b/content/copilot/quickstart.md @@ -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 %} @@ -95,6 +93,7 @@ Instructions for using {% data variables.product.prodname_copilot_short %} diffe ## Prerequisites {% ifversion ghec %} + * **Subscription to {% data variables.product.prodname_copilot_short %}**. To use {% data variables.product.prodname_copilot %} in {% data variables.product.prodname_windows_terminal %}, you must have an active {% data variables.product.prodname_copilot %} subscription. {% data reusables.copilot.subscription-prerequisite %} {% endif %} * **{% data variables.product.prodname_windows_terminal %} Canary**. Terminal Chat is only available in [{% data variables.product.prodname_windows_terminal %} Canary](https://github.com/microsoft/terminal?tab=readme-ov-file#installing-windows-terminal-canary). @@ -145,6 +144,7 @@ Instructions for using {% data variables.product.prodname_copilot_short %} diffe ## Prerequisites {% ifversion ghec %} + * **{% data variables.product.prodname_copilot_short %} subscription** - To use {% data variables.product.prodname_copilot %} in {% data variables.product.prodname_vscode_shortname %}, you must have an active {% data variables.product.prodname_copilot %} subscription. {% data reusables.copilot.subscription-prerequisite %} {% endif %} {% data reusables.copilot.vscode-prerequisites %} @@ -184,6 +184,7 @@ The following example uses JavaScript, however other languages will work similar ## Next steps {% data reusables.copilot.quickstart-nextsteps1 %} + * **Use {% data variables.product.prodname_copilot_short %} like a pro** - Learn how to write effective prompts for {% data variables.product.prodname_copilot %}. For more information, see [Best practices for using {% data variables.product.prodname_copilot %} in {% data variables.product.prodname_vscode_shortname %}](https://code.visualstudio.com/docs/copilot/prompt-crafting) in the {% data variables.product.prodname_vscode %} documentation. * **Get familiar with {% data variables.copilot.next_edit_suggestions %}** - See [About {% data variables.copilot.next_edit_suggestions %}](/copilot/using-github-copilot/getting-code-suggestions-in-your-ide-with-github-copilot#about-next-edit-suggestions). {% data reusables.copilot.quickstart-nextsteps2 %} @@ -203,6 +204,7 @@ Instructions for using {% data variables.product.prodname_copilot_short %} diffe ## Prerequisites {% ifversion ghec %} + * **Subscription to {% data variables.product.prodname_copilot_short %}**. To use {% data variables.product.prodname_copilot %} in {% data variables.product.prodname_vs %}, you must have an active {% data variables.product.prodname_copilot %} subscription. {% data reusables.copilot.subscription-prerequisite %} {% endif %} {% data reusables.copilot.visual-studio-prerequisites %} @@ -235,6 +237,7 @@ The following example uses JavaScript, however other languages will work similar ## Next steps {% data reusables.copilot.quickstart-nextsteps1 %} + * **Prompt like a pro** - Watch [{% data variables.product.prodname_vs %} Prompt Engineering with {% data variables.product.prodname_copilot %}](https://www.youtube.com/watch?v=9hZsOeIINg8&list=PLReL099Y5nRckZDdcQ21UigO9pKa14yxC) on YouTube. {% data reusables.copilot.quickstart-nextsteps2 %} @@ -253,6 +256,7 @@ Instructions for using {% data variables.product.prodname_copilot_short %} diffe ## Prerequisites {% ifversion ghec %} + * **Subscription to {% data variables.product.prodname_copilot_short %}**. To use {% data variables.product.prodname_copilot %} in {% data variables.product.prodname_vs %}, you must have an active {% data variables.product.prodname_copilot %} subscription. {% data reusables.copilot.subscription-prerequisite %} {% endif %} * **A compatible JetBrains IDE**. {% data variables.product.prodname_copilot_short %} is supported in a large number of JetBrains IDEs. For a full list, see [AUTOTITLE](/copilot/github-copilot-chat/copilot-chat-in-ides/using-github-copilot-chat-in-your-ide?tool=jetbrains). diff --git a/content/copilot/using-github-copilot/using-github-copilot-for-pull-requests/index.md b/content/copilot/using-github-copilot/using-github-copilot-for-pull-requests/index.md index ba3ac0a0197f..8ef8a283565b 100644 --- a/content/copilot/using-github-copilot/using-github-copilot-for-pull-requests/index.md +++ b/content/copilot/using-github-copilot/using-github-copilot-for-pull-requests/index.md @@ -7,6 +7,5 @@ versions: topics: - Copilot children: - - /using-copilot-to-help-you-work-on-a-pull-request - /creating-a-pull-request-summary-with-github-copilot --- diff --git a/content/copilot/using-github-copilot/using-github-copilot-for-pull-requests/using-copilot-to-help-you-work-on-a-pull-request.md b/content/copilot/using-github-copilot/using-github-copilot-for-pull-requests/using-copilot-to-help-you-work-on-a-pull-request.md deleted file mode 100644 index 7b1fc067f373..000000000000 --- a/content/copilot/using-github-copilot/using-github-copilot-for-pull-requests/using-copilot-to-help-you-work-on-a-pull-request.md +++ /dev/null @@ -1,213 +0,0 @@ ---- -title: Using Copilot to help you work on a pull request -shortTitle: Work on a PR -intro: 'You can iterate, validate, and integrate suggested changes to code by using {% data variables.copilot.copilot_workspace %}.' -product: '{% data reusables.gated-features.copilot-free-availability %}' -versions: - feature: copilot-hadron -topics: - - Copilot ---- - -> [!NOTE] {% data variables.copilot.copilot_workspace %} is in limited {% data variables.release-phases.public_preview %}. The waitlist for admission to this preview is currently closed. - -## About using {% data variables.product.prodname_copilot_short %} to help you work on your pull requests - -After you create a pull request, you can continue working on the PR on the {% data variables.product.github %} website. This article is about {% data variables.copilot.copilot_workspace %}, which provides a {% data variables.product.prodname_copilot_short %}-enabled environment for: - -* **Refining** your pull requests -* **Validating** changes -* **Integrating** suggestions from reviewers - -{% data variables.copilot.copilot_workspace %} enables you to work on your pull requests in one place - on {% data variables.product.github %} - from pull request creation to merge. - -{% data variables.product.prodname_copilot_short %} can help with pull requests in other ways too. These are explained in separate articles. {% data variables.product.prodname_copilot_short %} can: -* Write a pull request summary for you - see [AUTOTITLE](/copilot/using-github-copilot/using-github-copilot-for-pull-requests/creating-a-pull-request-summary-with-github-copilot). -* Review a pull request for you - see [AUTOTITLE](/copilot/using-github-copilot/code-review/using-copilot-code-review). -* Suggest fixes for coding problems identified by {% data variables.product.prodname_codeql %} {% data variables.product.prodname_code_scanning %} - see [AUTOTITLE](/code-security/code-scanning/managing-code-scanning-alerts/responsible-use-autofix-code-scanning). - -### Benefits of {% data variables.copilot.copilot_workspace %} - -{% data variables.copilot.copilot_workspace %}: - -* Allows you to work on a pull request without having to switch back and forward between the {% data variables.product.github %} website and your IDE. -* Gives you easy access to view/test/modify/apply coding suggestions, from {% data variables.product.prodname_copilot_short %} code reviews and {% data variables.copilot.copilot_autofix_short %}, as well as reviews by human reviewers. -* Gives you {% data variables.product.prodname_copilot_short %} code completion suggestions on {% data variables.product.github %}. Previously these were only available in an IDE. -* Shows you a list of files changed by the pull request, within the browser-based editor, but also allows you to find and edit any file from across the repo. -* Enables you to build, test, and run your code directly from the {% data variables.copilot.copilot_workspace_short %} environment on {% data variables.product.github %}. - -## Prerequisites - -Using {% data variables.copilot.copilot_workspace %} requires an existing pull request on the {% data variables.product.github %} website and either of the following: - -* Access to this {% data variables.release-phases.public_preview %} from the waitlist (now closed). -* Access to {% data variables.product.prodname_GHAS %} (GHAS) features on a private repository owned by an organization on a {% data variables.product.prodname_team %} or {% data variables.product.prodname_enterprise %} plan. See [AUTOTITLE](/get-started/learning-about-github/about-github-advanced-security). - -Without access to {% data variables.copilot.copilot_workspace %} you can still edit the files in pull requests by going to the **Files changed** tab, clicking the ellipsis (**...**) next to the file you want to edit, and then clicking **Edit file**. - -## Editing files in a pull request - -To work on a pull request in {% data variables.copilot.copilot_workspace %}: - -1. Click the **{% octicon "copilot" aria-hidden="true" aria-label="copilot" %} Open in {% data variables.copilot.copilot_workspace_short %}** button on the right side of the main page of a pull request. - - {% data variables.copilot.copilot_workspace %} opens, displaying an overview of the pull request. - - At the left of the {% data variables.copilot.copilot_workspace %} window is a list of the files changed by the pull request. - - ![Screenshot of the list of files in a PR, at the left of {% data variables.copilot.copilot_workspace %}.](/assets/images/help/copilot/workspace-files-in-pr.png) - -1. To work on a file that is not currently changed by this pull request, click **Files in this pull request** and, from the dropdown, select **All files in this repository**. -1. Click a file in the list to open the file in the {% data variables.copilot.copilot_workspace_short %} editor. - - The file is displayed in a diff view. You can change the view if required. See [Changing the {% data variables.copilot.copilot_workspace_short %} options](#changing-the-workspace-options) later in this article. - - You can open and change multiple files before committing your changes. - -1. After you have finished making changes, click **Review and commit**. - - The **Commit changes** panel is displayed. {% data variables.product.prodname_copilot_short %} autogenerates a commit message for you, based on the changes you have made. You can edit the message and add an extended description if you want. - - ![Screenshot of the "Commit changes" panel showing an autogenerated commit message and three changed files.](/assets/images/help/copilot/workspace-commit-changes.png) - - The panel lists the files you have changed. You can expand each file to see the changes you have made. - -1. Optionally, if you edited multiple files and you decide you don't want to commit all of the changes in a single commit, clear the check box beside the files whose changes you don't want to commit. When you click **Commit changes**, the changes you applied to those files will remain applied but uncommitted, and you can add them to the pull request in a separate commit. - - > [!NOTE] If you clear the check box beside some files you may need to rewrite the commit message to avoid mentioning the changes to those files. - -1. Click **Commit changes**. - - Alternatively, click **Reset all changes** to return the files to their current state in the pull request, losing the changes you made in the {% data variables.copilot.copilot_workspace_short %} editor panel. Resetting your changes cannot be undone. - -## Using {% data variables.product.prodname_copilot_short %} to work on pull request comments - -You can use {% data variables.copilot.copilot_workspace %} to work through all comments on your pull request, one after the other, and then commit any changes you choose to make in a single commit. - -1. On a comment that includes a code change suggestion, click **Open in {% data variables.copilot.copilot_workspace_short %}**. - - ![Screenshot of a coding suggestion by {% data variables.copilot.copilot_code-review_short %}.](/assets/images/help/copilot/workspace-copilot-review-suggestion.png) - - {% data variables.copilot.copilot_workspace %} opens, displaying the suggested change in the Suggestions panel on the right of the {% data variables.copilot.copilot_workspace_short %} window. - -1. Review the suggested change, then click one of the two buttons at the bottom of the Suggestions panel: - - * **Apply** - If you agree with the suggested change. - * **Dismiss** - If you do not want to make the suggested change. - -1. If there are multiple comments in the pull request, you can step through to the next comment by clicking the **>** arrow at the bottom of the Suggestions panel. - - ![Screenshot of the Suggestions panel, showing the ">" arrow and "Dismiss" and "Apply" buttons.](/assets/images/help/copilot/workspace-next-comment.png) - -1. Optionally, to see a list of all of the comments in the pull request, click the back arrow at the top left of the Suggestions panel. - - ![Screenshot of the Suggestions panel, showing the back arrow at the top left.](/assets/images/help/copilot/workspace-all-comments.png) - - If you have accepted or dismissed any suggestions, these are shown within "applied" and "dismissed" dropdowns, which make it easy to see which suggestions you have not yet dealt with. - - ![Screenshot a list of comments in the Suggestions panel. Two are awaiting action. Beneath this are dropdown links headed "1 applied" and "1 dismissed."](/assets/images/help/copilot/workspace-applied-dismissed.png) - -1. After you have finished reviewing the suggested changes, click **Review and commit**. -1. Optionally, if you decide you don't want to commit all of the applied changes in a single commit, clear the check box beside the files whose changes you don't want to commit. When you click **Commit changes**, the changes you applied to those files will remain applied but uncommitted, and you can add them to the pull request in a separate commit. -1. Click **Commit changes**. - - Alternatively, click **Reset all changes** to return the suggestions to their initial state, losing the apply or dismiss choices you made, and losing any changes you made by editing files directly in the {% data variables.copilot.copilot_workspace_short %} editor panel. Resetting your changes cannot be undone. - -## Chatting with {% data variables.product.prodname_copilot_short %} about a pull request - -1. At the top of the {% data variables.copilot.copilot_workspace_short %} window, click the {% octicon "copilot" aria-label="Toggle {% data variables.product.prodname_copilot_short %} button. -1. At the bottom of the {% data variables.product.prodname_copilot_short %} panel, type a question in the "Ask {% data variables.product.prodname_copilot_short %}" box then press Enter. - - You can ask questions about: - - * **The currently displayed file** - for example, "how could I improve this file?" - * **The whole pull request** - for example, "what frameworks are referenced in this pull request?" - * **General programming topics** - for example, "what is the latest version of ruby?" - - For more information, see [AUTOTITLE](/copilot/using-github-copilot/asking-github-copilot-questions-in-githubcom). - -> [!NOTE] Currently not all {% data variables.copilot.copilot_chat_short %} features are available in the {% data variables.release-phases.public_preview %} of {% data variables.copilot.copilot_workspace %}. - -## Verifying your changes - -{% data variables.copilot.copilot_workspace_short %} includes a built-in terminal and a quick way to build, run, and test your code. - -### Opening the terminal - -To open the terminal, click {% octicon "terminal" aria-label="Toggle console panel" %} at the top right of the {% data variables.copilot.copilot_workspace_short %} editor panel. - -> [!NOTE] The terminal requires a codespace to be running. If you don't see the {% octicon "terminal" aria-label="Toggle console panel" %} icon, you may need to wait a few seconds for the codespace to start. - -### Running terminal commands - -You can type commands directly into the terminal, or you can use quick commands to run commonly used commands with a couple of clicks. - -#### Configuring personal quick commands - -You can configure **Build**, **Run**, and **Test** commands that you can use when you work on a specific project in {% data variables.copilot.copilot_workspace %}. If commands have already been configured for the repository, you can replace them with alternative commands for your own personal use. - -1. At the top of the {% data variables.copilot.copilot_workspace_short %} window, click **{% octicon "gear" aria-hidden="true" aria-label="gear" %} Configure**. - - If **Build**, **Run**, and **Test** quick commands have already been defined, the **{% octicon "play" aria-hidden="true" aria-label="play" %} Build** button is displayed instead of **{% octicon "gear" aria-hidden="true" aria-label="gear" %} Configure**. Click the dropdown arrow beside the **{% octicon "play" aria-hidden="true" aria-label="play" %} Build** button and then click **{% octicon "gear" aria-hidden="true" aria-label="gear" %} Configure** from the dropdown menu. - - ![Screenshot of the "Commands" dropdown menu with the "Configure" option highlighted with a dark orange outline.](/assets/images/help/copilot/workspace-configure-commands.png) - -1. In the "Configure commands" dialog, enter the commands you want to use for **Build**, **Run**, and **Test** options. -1. Click **Save**. - -#### Configuring quick commands for your repository - -You can set default **Build**, **Run**, and **Test** commands for everyone who uses {% data variables.copilot.copilot_workspace %} to work on pull requests for your repository. - -1. Create or edit a file in the root of your repository called `.devcontainer/devcontainer.json`. - - > [!NOTE] The `.devcontainer/devcontainer.json` file is a configuration file for codespaces created for a repository. For more information, see [AUTOTITLE](/enterprise-cloud@latest/codespaces/setting-up-your-project-for-codespaces/adding-a-dev-container-configuration/introduction-to-dev-containers#devcontainerjson). - -1. Add a `commands` section as follows, replacing the example commands shown here with the commands that people working on your repository should use. - - ```json - { - "commands": { - "Build": "make", - "Run": "./bin/start", - "Test": "make test" - } - } - ``` - -1. Click **Save**. - -#### Using {% data variables.copilot.copilot_workspace_short %} quick commands - -1. To run the first of the defined quick commands (typically **Build**), click the button at the top of the {% data variables.copilot.copilot_workspace_short %} window. -1. To run a different quick command, click the dropdown arrow beside the button and then click the command you want to run from the dropdown menu. - - ![Screenshot of the "Commands" dropdown menu with the "Run" option highlighted with a dark orange outline.](/assets/images/help/copilot/workspace-run-command.png) - -1. After clicking **Run**, while the process is running, you can click the dropdown arrow again and choose from options to stop or restart the process, or view the output from the run command. - - ![Screenshot of the dropdown menu for a running application with the "Stop" option highlighted with a dark orange outline.](/assets/images/help/copilot/workspace-stop-command.png) - -#### Previewing a web application - -If your run command starts a web server, the {% octicon "globe" aria-label="Open preview" %} button is displayed at the top of the {% data variables.copilot.copilot_workspace_short %} window. - -Click this button to preview the server output in a new tab of your browser. - -## Changing the {% data variables.copilot.copilot_workspace_short %} options - -You can change how files are displayed in {% data variables.copilot.copilot_workspace %}. - -### Changing the diff view - -1. Click the compare picker icon ({% octicon "git-compare" aria-hidden="true" aria-label="git-compare" %}), at the top right of the {% data variables.copilot.copilot_workspace_short %} editor panel. -1. Choose a view option: - - * **Unified** - Shows changes in a single view, with added lines highlighted in green and removed lines highlighted in red. - * **Split** - Shows changes in a split view, with the original file on the left and the new file on the right. - * **Hidden** - Shows the current state of the file in this pull request, without showing what changes the PR makes. - -### Wrapping long lines - -1. Click the ellipsis (**...**), at the top right of the {% data variables.copilot.copilot_workspace_short %} editor panel. -1. Click **Wrap lines** to toggle line wrapping on or off. diff --git a/content/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request.md b/content/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request.md index d02d9a44d6c0..649225f2e561 100644 --- a/content/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request.md +++ b/content/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request.md @@ -37,6 +37,7 @@ When you change the base repository, you also change notifications for the pull When you change any of the information in the branch range, the Commit and Files changed preview areas will update to show your new range. > [!TIP] +> > * Using the compare view, you can set up comparisons across any timeframe. For more information, see [AUTOTITLE](/pull-requests/committing-changes-to-your-project/viewing-and-comparing-commits/comparing-commits). > * Project maintainers can add a pull request template for a repository. Templates include prompts for information in the body of a pull request. For more information, see [AUTOTITLE](/communities/using-templates-to-encourage-useful-issues-and-pull-requests/about-issue-and-pull-request-templates). @@ -45,11 +46,13 @@ When you change any of the information in the branch range, the Commit and Files {% webui %} {% data reusables.repositories.navigate-to-repo %} + 1. In the "Branch" menu, choose the branch that contains your commits. ![Screenshot of the branch dropdown menu on the main page of a repository.](/assets/images/help/pull_requests/branch-dropdown.png) {% data reusables.repositories.new-pull-request %} + 1. Use the _base_ branch dropdown menu to select the branch you'd like to merge your changes into, then use the _compare_ branch drop-down menu to choose the topic branch you made your changes in. {% data reusables.repositories.pr-title-description %} {% data reusables.repositories.create-pull-request %} @@ -185,14 +188,6 @@ You can also make changes to files on the {% data variables.product.github %} we 1. In the menu, click **Edit file**. 1. Make your changes in the editor and when committing your change, choose to commit directly back to your head branch. -{% ifversion copilot-hadron %} - -If you are part of the {% data variables.release-phases.public_preview %} of {% data variables.copilot.copilot_workspace %}, clicking **Edit** on a file on the "Files changed" tab will open the file in a {% data variables.copilot.copilot_workspace %} on {% data variables.product.prodname_dotcom %}. In a {% data variables.copilot.copilot_workspace %}, you can still make changes to the file but also make changes to other files in the repository, group your changes into a single commit, and take advantage of {% data variables.product.prodname_copilot_short %} code completion. - -You can access {% data variables.copilot.copilot_workspace %} by choosing to edit an individual file or by clicking **Open in {% data variables.copilot.copilot_workspace_short %}** in your pull request's right sidebar. For more information about {% data variables.copilot.copilot_workspace %} and joining the {% data variables.release-phases.public_preview %}, see [AUTOTITLE](/copilot/using-github-copilot/using-github-copilot-for-pull-requests/using-copilot-to-help-you-work-on-a-pull-request). - -{% endif %} - {% endwebui %} ## Further reading diff --git a/content/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/requesting-a-pull-request-review.md b/content/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/requesting-a-pull-request-review.md index 5937dbfb44c2..6b4c1467c80f 100644 --- a/content/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/requesting-a-pull-request-review.md +++ b/content/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/requesting-a-pull-request-review.md @@ -25,15 +25,10 @@ Organization members with write access can also assign a pull request review to > [!NOTE] > Pull request authors can't request reviews unless they are either a repository owner or collaborator with write access to the repository. -{% ifversion copilot-hadron %} - -## Requesting reviews from collaborators and organization members - -{% endif %} - You can request a review from either a suggested or specific person. Suggested reviewers are based on [git blame data](/repositories/working-with-files/using-files/viewing-a-file). If you request a review, other people with read access to the repository can still review your pull request. Once someone has reviewed your pull request and you've made the necessary changes, you can re-request review from the same reviewer. If the requested reviewer does not submit a review, and the pull request meets the repository's [mergeability requirements](/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests), you can still merge the pull request. {% data reusables.repositories.sidebar-pr %} + 1. In the list of pull requests, click the pull request that you'd like to ask a specific person or a team to review. 1. To request a review from a suggested person under **Reviewers**, next to their username, click **Request**. @@ -47,17 +42,6 @@ You can request a review from either a suggested or specific person. Suggested r ![Screenshot of the "Reviewers" section of a pull request's sidebar. To the right of @octocat, a sync icon is outlined in dark orange.](/assets/images/help/pull_requests/request-re-review.png) -{% ifversion copilot-hadron %} - -## Requesting a review from {% data variables.product.prodname_copilot %} - ->[!NOTE] ->{% data variables.copilot.copilot_workspace %} is currently in {% data variables.release-phases.public_preview %}. For information about joining the {% data variables.release-phases.public_preview %}, see [AUTOTITLE](/copilot/using-github-copilot/using-github-copilot-for-pull-requests/using-copilot-to-help-you-work-on-a-pull-request). - -You can also request that {% data variables.product.prodname_copilot_short %} reviews your code and provides feedback and suggested changes on your work. See [AUTOTITLE](/copilot/using-github-copilot/code-review/using-copilot-code-review). - -{% endif %} - ## Further reading * [AUTOTITLE](/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/about-pull-request-reviews) diff --git a/content/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/incorporating-feedback-in-your-pull-request.md b/content/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/incorporating-feedback-in-your-pull-request.md index 9662e3bb0481..b7935b568244 100644 --- a/content/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/incorporating-feedback-in-your-pull-request.md +++ b/content/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/incorporating-feedback-in-your-pull-request.md @@ -20,15 +20,6 @@ Other people can suggest specific changes to your pull request. You can apply th To quickly incorporate more than one suggested change into a single commit, you can also apply suggested changes as a batch. Applying one suggested change or a batch of suggested changes creates a single commit on the compare branch of the pull request. -{% ifversion copilot-hadron %} - ->[!NOTE] ->If you are part of the {% data variables.release-phases.public_preview %} of {% data variables.copilot.copilot_workspace %}, suggested changes from people on your team, {% data variables.product.prodname_copilot_short %}, or {% data variables.copilot.copilot_autofix %} can all be applied and edited in {% data variables.copilot.copilot_workspace %}. Click **Open in {% data variables.copilot.copilot_workspace_short %}** on a suggested change to get started. -> ->For more information about {% data variables.copilot.copilot_workspace %} and joining the {% data variables.release-phases.public_preview %}, see [AUTOTITLE](/copilot/using-github-copilot/using-github-copilot-for-pull-requests/using-copilot-to-help-you-work-on-a-pull-request). - -{% endif %} - Each person who suggested a change included in the commit will be a co-author of the commit. The person who applies the suggested changes will be a co-author and the committer of the commit. For more information about the term committer in Git, see [Git Basics - Viewing the Commit History](https://git-scm.com/book/en/v2/Git-Basics-Viewing-the-Commit-History) from the _Pro Git_ book site. {% data reusables.repositories.sidebar-pr %}