Skip to content

Commit 173f27c

Browse files
committed
Remove PR/issue closing instructions from coding agent prompts
The Copilot coding agent cannot close PRs or issues. Instead, instruct it to push an empty commit explaining the no-changes outcome, and let the maintainer handle cleanup manually.
1 parent 324ea71 commit 173f27c

2 files changed

Lines changed: 3 additions & 18 deletions

File tree

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

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -333,12 +333,7 @@ Run the finish script which updates `.lastmerge`, runs a final build, and pushes
333333
gh pr edit --add-label "upstream-sync"
334334
```
335335

336-
> **No-changes scenario (coding agent only):** If after analyzing the upstream diff there are no relevant changes to port to the Java SDK, you **MUST** close the auto-created pull request and the triggering issue by running these commands in a terminal:
337-
>
338-
> 1. Close the PR: `gh pr close $(gh pr view --json number --jq .number) --comment "No relevant upstream changes to port to the Java SDK."`
339-
> 2. Close the issue: `gh issue close ISSUE_NUMBER --reason "not planned" --comment "No relevant upstream changes to port to the Java SDK. Closing as not planned."` (replace ISSUE_NUMBER with the actual issue number)
340-
>
341-
> **CRITICAL: You MUST run these `gh` CLI commands in a terminal. Do NOT skip these steps.** Both commands are required when there are no changes to port.
336+
> **No-changes scenario (coding agent only):** If after analyzing the upstream diff there are no relevant changes to port to the Java SDK, push an empty commit with a message explaining why no changes were needed, so the PR reflects the analysis outcome. The repository maintainer will close the PR and issue manually.
342337
343338
**If running manually** (e.g., from VS Code via the reusable prompt), create the Pull Request using `gh` CLI or the GitHub MCP tool. Then add the label:
344339

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

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,5 @@ Add the 'upstream-sync' label to the existing PR by running this command in a te
1515
gh pr edit --add-label "upstream-sync"
1616

1717
If after analyzing the upstream diff there are no relevant changes to port to the Java SDK,
18-
you MUST close the pull request and the issue. Run the following commands in a terminal:
19-
20-
1. Close the auto-created pull request:
21-
22-
gh pr close $(gh pr view --json number --jq .number) --comment "No relevant upstream changes to port to the Java SDK."
23-
24-
2. Close the triggering issue as 'not planned' (replace ISSUE_NUMBER with the actual issue number from the issue that was assigned to you):
25-
26-
gh issue close ISSUE_NUMBER --reason "not planned" --comment "No relevant upstream changes to port to the Java SDK. Closing as not planned."
27-
28-
CRITICAL: You MUST run these gh CLI commands in a terminal. Do NOT skip these steps.
29-
Both the PR close and issue close commands are required when there are no changes to port.
18+
push an empty commit with a message explaining why no changes were needed, so the PR reflects
19+
the analysis outcome. The repository maintainer will close the PR and issue manually.

0 commit comments

Comments
 (0)