Lesson 8 - Create and merge the feature PR
Este conteúdo não está disponível em sua língua ainda.
Your filtering implementation, instruction updates, skill update, quality assurance (QA) profile, and tests are saved on one branch. It’s time to review them together and open a pull request. You merged the star-rating pull request (PR) yourself; this time you’ll allow Agent Merge to manage the process.
Normally, we’d split the feature, instruction updates, skill update, and QA agent into a few separate PRs. To streamline the workshop, you’ve kept the full filtering and quality workflow in one conversation and branch, with all that work going into this PR.
In this lesson, you will:
- learn what Agent Merge is and how it automates the merge lifecycle.
- inspect the full feature change and verification evidence.
- create the filtering PR.
- enable Agent Merge only after review and confirm the PR is merged.
Scenario
Throughout the filtering workflow, you’ve used Copilot to plan, implement, and verify a feature. Tailspin Toys now wants to automate the remaining PR work while keeping merge authorization under the developer’s control.
Introducing Agent Merge
Agent Merge automates the remaining work needed to land a pull request. When you enable it, Copilot works through what is blocking the PR — fixing failing continuous integration (CI) checks, responding to review comments, and rebasing when needed — then enables GitHub auto-merge when the repository allows it.
Up to this point you’ve selected Merge pull request yourself. Agent Merge can take on that responsibility. Review the work and decide it is ready before enabling Agent Merge.
Use Agent Merge to manage the PR
With all of your code created, let’s review it together, create the PR, and allow Agent Merge to manage the rest of the process.
- Return to your Codespace.
- Open the agent dialog by entering
/agent. - Select Default from the list of options and select Enter.
- Create a new PR by using the command
/pr create. - Activate agent merge by using
/pr agentmerge - Copilot will watch the continuous integration process on the PR. Once everything succeeds, it will perform the merge.
- Ensure you see a message from Copilot saying something similar to “PR #14 was squash-merged successfully.”
Agent Merge does not bypass required approvals, branch protection, merge queues, repository settings, or missing permissions. If it is blocked, read the reported reason and complete the reviewed merge manually when your repository permits it.
Summary and next steps
You’ve automated several parts of the development process, including generating code, testing and validating code, and now the pull request process. You:
- learned what Agent Merge is and how it automates the merge lifecycle.
- inspected the full feature change and verification evidence.
- created the filtering PR.
- enabled Agent Merge only after review and confirmed the PR was merged.
Next, you’ll explore more useful Copilot CLI slash commands for context, models, sharing, and optional cloud delegation.