5.6 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 | Create a PR from chat | You can ask {% data variables.product.prodname_copilot_short %} to create a pull request from the Agents page or from {% data variables.copilot.copilot_chat_short %}. | {% 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
- {% data reusables.copilot.coding-agent.preview-note-text %}
- For an overview of {% data variables.copilot.copilot_coding_agent %}, see AUTOTITLE.
Introduction
You can ask {% data variables.product.prodname_copilot_short %} to work on a task from the Agents page on {% data variables.product.github %}, or from {% data variables.copilot.copilot_chat_short %} in {% data variables.product.prodname_vscode %}, {% data variables.product.prodname_vs %}, JetBrains IDEs and {% data variables.product.prodname_dotcom_the_website %}.
{% data variables.product.prodname_copilot_short %} will start working on the task, raise a pull request, then request a review from you when it's finished working. For more information, see AUTOTITLE.
Asking {% data variables.product.prodname_copilot_short %} to create a pull request from the Agents page
-
Navigate to the Agents page at github.com/copilot/agents.
You can also reach this page by clicking the {% octicon "copilot" aria-label="Copilot icon" %} button next to the search bar on any page on {% data variables.product.github %}, then selecting Agents from the sidebar.
-
Using the dropdown menu in the prompt field, select the repository you want {% data variables.product.prodname_copilot_short %} to work in.
-
Type a prompt describing your request.
For example,
Implement a user friendly message for common errors.
-
Click the Send now button or press Return.
{% data variables.product.prodname_copilot_short %} will start a new session, which will appear in the list below the prompt box. {% data variables.product.prodname_copilot_short %} will work on the task and push changes to its pull request, then add you as a reviewer when it has finished, triggering a notification.
Asking {% data variables.product.prodname_copilot_short %} to create a pull request from {% data variables.copilot.copilot_chat_short %}
Note
- You can ask {% data variables.product.prodname_copilot_short %} to create a pull request from {% data variables.copilot.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 %}.
-
Open {% data variables.copilot.copilot_chat %}, in your IDE or 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 %}
-
Submit your prompt.
{% data variables.product.prodname_copilot_short %} asks you to confirm that you want to use the coding agent to create a pull request.
-
Click Allow.
{% data variables.product.prodname_copilot_short %} will start a new session and 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 view your current and past {% data variables.product.prodname_copilot_short %} sessions from the Agents page. See AUTOTITLE.
You can see what {% data variables.product.prodname_copilot_short %} is doing while it is working on a task by viewing the session logs. You can access the session logs by clicking the View session button in the timeline of {% data variables.product.prodname_copilot_short %}'s pull request.
From the session logs page, you can also stop {% data variables.product.prodname_copilot_short %} from working on a task by clicking Stop session.
