Примечание.
- If you have access to Агент кодирования Copilot, you can create a pull request from Copilot Chat in Visual Studio Code, Visual Studio, JetBrains IDEs, and on GitHub.com.
- Агент кодирования Copilot is in public preview and subject to change.
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 GitHub issue to record that a change needs to be made—or perhaps, forget the change and move on.
Instead—if Агент кодирования Copilot is available—you can ask Copilot to make the change for you. Copilot 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 Агент кодирования Copilot available, see Enabling Copilot coding agent.
Creating a pull request from Copilot Chat
-
Open Чат GitHub Copilot, in your IDE, or while viewing a file on GitHub.com.
-
Type a prompt asking Copilot to create a pull request, and giving details of what you want Copilot to change.
For example,
@github Create a PR to put backticks around file names and variables in output.
Внимание
In VS Code, Visual Studio, and JetBrains IDEs, you must mention the
@github
chat participant in your prompt. You can omit this in Copilot Chat on GitHub.com.Совет
To help Copilot, you can select the relevant line(s) of code before submitting your prompt.
-
Submit your prompt.
Copilot 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 Copilot is doing while it is working on a task by viewing the session logs. See Using the Copilot coding agent logs.
You can also stop Copilot from working on a task by clicking Stop session in the session logs.