Skip to content

Commit c84a325

Browse files
committed
Update merge-upstream prompt to auto-create PR via GitHub MCP tool
1 parent 6995f4b commit c84a325

1 file changed

Lines changed: 43 additions & 9 deletions

File tree

.github/prompts/agentic-merge-upstream.prompt.md

Lines changed: 43 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -354,20 +354,52 @@ git commit -m "Update .lastmerge to $NEW_COMMIT"
354354

355355
## Step 12: Push Branch and Create Pull Request
356356

357-
Push the branch to remote so the changes can be reviewed via Pull Request:
357+
Push the branch to remote and create a Pull Request automatically:
358358

359359
```bash
360360
# Push the branch to remote
361361
git push -u origin "$BRANCH_NAME"
362-
363-
echo "Branch '$BRANCH_NAME' pushed to remote."
364-
echo "Create a Pull Request to review and merge the changes."
365362
```
366363

367-
**Important:** After pushing, provide the user with:
368-
1. The branch name that was pushed
369-
2. A summary of the changes that were ported
370-
3. Instructions to create a Pull Request comparing the branch against `main`
364+
**After pushing, create the Pull Request using the GitHub MCP tool (`mcp_github_create_pull_request`).**
365+
366+
Use `owner: copilot-community-sdk`, `repo: copilot-sdk-java`, `head: $BRANCH_NAME`, `base: main`.
367+
368+
The PR body should include:
369+
1. **Title**: `Merge upstream SDK changes (YYYY-MM-DD)`
370+
2. **Body** with:
371+
- Summary of upstream commits analyzed (with count and commit range)
372+
- Table of changes ported (commit hash + description)
373+
- List of changes intentionally not ported (with reasons)
374+
- Verification status (test count, build status)
375+
376+
### PR Body Template
377+
378+
```markdown
379+
## Upstream Merge
380+
381+
Ports changes from the official Copilot SDK ([github/copilot-sdk](https://github.com/github/copilot-sdk)) since last merge (`<OLD_COMMIT>``<NEW_COMMIT>`).
382+
383+
### Upstream commits analyzed (N commits)
384+
385+
- Brief description of each upstream change and whether it was ported or not
386+
387+
### Changes ported
388+
389+
| Commit | Description |
390+
|---|---|
391+
| `<hash>` | Description of change |
392+
393+
### Not ported (intentionally)
394+
395+
- **Feature name** — Reason why it wasn't ported
396+
397+
### Verification
398+
399+
- All **N tests pass** (`mvn clean test`)
400+
- Package builds successfully (`mvn clean package -DskipTests`)
401+
- Code formatted with Spotless
402+
```
371403

372404
## Step 13: Final Review
373405

@@ -378,6 +410,7 @@ Before finishing:
378410
3. Ensure no unintended changes were made
379411
4. Verify code follows project conventions
380412
5. Confirm the branch was pushed to remote
413+
6. Confirm the Pull Request was created and provide the PR URL to the user
381414

382415
---
383416

@@ -404,7 +437,8 @@ Before finishing:
404437
- [ ] `src/site/site.xml` updated if new documentation pages were added
405438
- [ ] `.lastmerge` file updated with new commit hash
406439
- [ ] Branch pushed to remote
407-
- [ ] User informed about Pull Request creation
440+
- [ ] **Pull Request created** via GitHub MCP tool (`mcp_github_create_pull_request`)
441+
- [ ] PR URL provided to user
408442

409443
---
410444

0 commit comments

Comments
 (0)