Hinweis
- If you have access to Copilot-Programmier-Agent, you can create a pull request from Copilot Chat in Visual Studio Code, Visual Studio, JetBrains IDEs, and on GitHub.com.
- Copilot-Programmier-Agent befindet sich in der public preview. Änderungen sind vorbehalten. Während der Vorschauphase unterliegt die Verwendung des Features den Lizenzbestimmungen für die Vorabversion von GitHub.
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-Programmier-Agent 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-Programmier-Agent available, see Enabling Copilot coding agent.
Creating a pull request from Copilot Chat
-
Open GitHub Copilot Chat, 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.
Wichtig
In VS Code, Visual Studio und JetBrains-IDEs musst du in deinem Prompt den
@github
-Chatteilnehmer erwähnen. In Copilot Chat auf GitHub.com kannst du das auslassen.Tipp
To help Copilot, you can select the relevant line(s) of code before submitting your prompt.
-
Submit your prompt.
Copilot asks you to confirm that you want to use the coding agent to create a pull request.
-
Click Allow.
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.