Co-authored-by: hubwriter <hubwriter@github.com> Co-authored-by: Felicity Chapman <felicitymay@github.com> Co-authored-by: Joe Clark <31087804+jc-clark@users.noreply.github.com> Co-authored-by: Isaac Brown <101839405+isaacmbrown@users.noreply.github.com> Co-authored-by: Anne-Marie <102995847+am-stead@users.noreply.github.com> Co-authored-by: felix <guntrip@github.com> Co-authored-by: Felix Guntrip <stevecat@github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Laura Coursen <lecoursen@github.com> Co-authored-by: Tim Rogers <timrogers@github.com> Co-authored-by: Sarah Schneider <sarahs@users.noreply.github.com> Co-authored-by: Sophie <29382425+sophietheking@users.noreply.github.com> Co-authored-by: Nhu Do <nhu-do@github.com> Co-authored-by: Ellie Bennett <34038869+elliebennett@users.noreply.github.com> Co-authored-by: Janice <janiceilene@github.com> Co-authored-by: Melanie Yarbrough <11952755+myarb@users.noreply.github.com> Co-authored-by: Sarah Schneider <sarahs@github.com> Co-authored-by: Ben Ahmady <32935794+subatoi@users.noreply.github.com> Co-authored-by: Sunbrye Ly <56200261+sunbrye@users.noreply.github.com> Co-authored-by: Steve Ward <steveward@github.com> Co-authored-by: Vanessa <vgrl@github.com> Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com> Co-authored-by: Kate Catlin <KateCatlin@users.noreply.github.com> Co-authored-by: Claire W <78226508+crwaters16@users.noreply.github.com>
4.0 KiB
title, shortTitle, intro, product, versions, topics, type, redirect_from
| title | shortTitle | intro | product | versions | topics | type | redirect_from | ||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Asking Copilot to create a pull request | Creating a PR from chat | You can use a {% data variables.product.prodname_copilot_chat_short %} prompt to ask {% data variables.product.prodname_copilot_short %} to create a pull request. | {% data reusables.gated-features.copilot-coding-agent %}<br><a href="https://github.com/features/copilot/plans?ref_cta=Copilot+plans+signup&ref_loc=asking+copilot+to+create+a+pull+request&ref_page=docs" target="_blank" class="btn btn-primary mt-3 mr-3 no-underline"><span>Sign up for {% data variables.product.prodname_copilot_short %}</span> {% octicon "link-external" height:16 %}</a> |
|
|
how_to |
|
Note
- If you have access to {% data variables.copilot.copilot_coding_agent %}, you can create a pull request from {% data variables.product.prodname_copilot_chat_short %} in {% data variables.product.prodname_vscode %}, {% data variables.product.prodname_vs %}, JetBrains IDEs, and on {% data variables.product.prodname_dotcom_the_website %}.
- {% data reusables.copilot.coding-agent.preview-note-text %}
Introduction
Often, when you are working on a project, you might notice a change you want to make, but the change doesn't directly relate to your current task. You might raise a {% data variables.product.github %} issue to record that a change needs to be made—or perhaps, forget the change and move on.
Instead—if {% data variables.copilot.copilot_coding_agent %} is available—you can ask {% data variables.product.prodname_copilot_short %} to make the change for you. {% data variables.product.prodname_copilot_short %} will start working on the change in the background and, when it's done, request you to review the pull request it raises.
For information on making {% data variables.copilot.copilot_coding_agent %} available, see AUTOTITLE.
Creating a pull request from {% data variables.product.prodname_copilot_chat_short %}
-
Open {% data variables.product.prodname_copilot_chat %}, in your IDE, or while viewing a file on {% data variables.product.prodname_dotcom_the_website %}.
-
Type a prompt asking {% data variables.product.prodname_copilot_short %} to create a pull request, and giving details of what you want {% data variables.product.prodname_copilot_short %} to change.
For example,
@github Create a PR to put backticks around file names and variables in output.Important
{% data reusables.copilot.coding-agent.use-chat-participant-in-vsc %}
Tip
To help {% data variables.product.prodname_copilot_short %}, you can select the relevant line(s) of code before submitting your prompt.
-
Submit your prompt.
{% data variables.product.prodname_copilot_short %} will respond with a link to the pull request it creates. It will work on the task and push changes to the pull request, and then add you as a reviewer when it has finished, triggering a notification.
Monitoring progress
You can see what {% data variables.product.prodname_copilot_short %} is doing while it is working on a task by viewing the session logs. See AUTOTITLE.
You can also stop {% data variables.product.prodname_copilot_short %} from working on a task by clicking Stop session in the session logs.