Skip to content

Commit bd64c53

Browse files
committed
Update merge instructions and setup workflow to utilize GitHub MCP tool for labeling PRs
1 parent cb97024 commit bd64c53

3 files changed

Lines changed: 11 additions & 8 deletions

File tree

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -327,18 +327,18 @@ Run the finish script which updates `.lastmerge`, runs a final build, and pushes
327327

328328
### PR Handling: Coding Agent vs. Manual Workflow
329329

330-
**If running as a Copilot coding agent** (triggered via GitHub issue assignment by the weekly sync workflow), a pull request has **already been created automatically** for you. Do NOT create a new one. Just push your commits to the current branch — the existing PR will be updated. Add the `upstream-sync` label to the existing PR:
330+
**If running as a Copilot coding agent** (triggered via GitHub issue assignment by the weekly sync workflow), a pull request has **already been created automatically** for you. Do NOT create a new one. Just push your commits to the current branch — the existing PR will be updated. Add the `upstream-sync` label to the existing PR using the GitHub MCP tool:
331331

332-
```bash
333-
gh pr edit <PR_NUMBER> --add-label "upstream-sync"
332+
```
333+
mcp_github_add_issue_labels(owner: "copilot-community-sdk", repo: "copilot-sdk-java", issue_number: <PR_NUMBER>, labels: ["upstream-sync"])
334334
```
335335

336336
> **No-changes scenario (coding agent only):** If after analyzing the upstream diff there are no relevant changes to port to the Java SDK, close the auto-created pull request, then close the triggering issue as "not planned" with a comment explaining that no changes were applicable.
337337
338338
**If running manually** (e.g., from VS Code via the reusable prompt), create the Pull Request using the GitHub MCP tool (`mcp_github_create_pull_request`). Use `owner: copilot-community-sdk`, `repo: copilot-sdk-java`, `head: $BRANCH_NAME`, `base: main`. Then add the label:
339339

340-
```bash
341-
gh pr edit <PR_NUMBER> --add-label "upstream-sync"
340+
```
341+
mcp_github_add_issue_labels(owner: "copilot-community-sdk", repo: "copilot-sdk-java", issue_number: <PR_NUMBER>, labels: ["upstream-sync"])
342342
```
343343

344344
The PR body should include:
@@ -414,7 +414,7 @@ Before finishing:
414414
- [ ] `.lastmerge` file updated with new commit hash
415415
- [ ] Branch pushed to remote
416416
- [ ] **Pull Request finalized** (coding agent: push to existing PR; manual: create via `mcp_github_create_pull_request`)
417-
- [ ] **`upstream-sync` label added** to the PR via `gh pr edit --add-label "upstream-sync"`
417+
- [ ] **`upstream-sync` label added** to the PR via `mcp_github_add_issue_labels`
418418
- [ ] PR URL provided to user
419419

420420
---

.github/prompts/coding-agent-merge-instructions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ Commit changes incrementally. Update .lastmerge when done.
1010
IMPORTANT: A pull request has already been created automatically for you — do NOT create a new
1111
one. Push your commits to the current branch, and the existing PR will be updated.
1212

13-
Add the 'upstream-sync' label to the existing PR using:
13+
Add the 'upstream-sync' label to the existing PR using the GitHub MCP tool:
1414

15-
gh pr edit <PR_NUMBER> --add-label upstream-sync
15+
mcp_github_add_issue_labels(owner: "copilot-community-sdk", repo: "copilot-sdk-java", issue_number: <PR_NUMBER>, labels: ["upstream-sync"])
1616

1717
If after analyzing the upstream diff there are no relevant changes to port to the Java SDK,
1818
close the pull request that was automatically created for you, then close this issue as

.github/workflows/copilot-setup-steps.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,6 @@ jobs:
3232

3333
- name: Download dependencies
3434
run: mvn dependency:go-offline -B
35+
36+
- name: Install Copilot CLI
37+
id: setup-copilot

0 commit comments

Comments
 (0)