Skip to content

Commit 0aa6442

Browse files
asdfg-zxcvbCopilot
andcommitted
feat(skills): cover the close-without-merging path in merge-pr
Workflow audit against the 28-skill catalog found that closing a PR without merging (superseded, abandoned, replaced) had no skill that both framed the workflow and gated the tool. update_pull_request_state was already in merge-pr.allowedTools but neither the description nor the body surfaced the close path, so a user prompt like "close this PR, it's superseded by #123" would not load merge-pr. Broaden merge-pr's description to mention closing/abandoning a PR, add update_pull_request to allowedTools (the consolidated update tool covers state changes too), and add a "Closing without merging" subsection that names update_pull_request_state and reminds the caller to leave a comment explaining the close. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent b7372cc commit 0aa6442

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

pkg/github/skill_resources.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,16 +190,17 @@ func skillAddressPRFeedback() skillDefinition {
190190
func skillMergePR() skillDefinition {
191191
return skillDefinition{
192192
name: "merge-pr",
193-
description: "Get a PR to merge-ready state and merge it. Use when merging a pull request, checking if a PR is ready to merge, updating a PR branch, or converting a draft PR.",
193+
description: "Get a PR to merge-ready state and merge it, or close a PR without merging. Use when merging a pull request, checking if a PR is ready to merge, updating a PR branch, converting a draft PR, or abandoning/closing a PR that should not ship.",
194194
allowedTools: []string{
195195
"pull_request_read",
196196
"merge_pull_request",
197197
"update_pull_request_branch",
198+
"update_pull_request",
198199
"update_pull_request_state",
199200
"update_pull_request_draft_state",
200201
"actions_get",
201202
},
202-
body: "# Merge Pull Request\n\nVerify a PR is ready and merge it.\n\n## Available Tools\n- `pull_request_read` — check status, reviews, and CI\n- `merge_pull_request` — merge the PR\n- `update_pull_request_branch` — update branch if behind base\n- `update_pull_request_draft_state` — convert draft to ready\n- `actions_get` — check workflow run details\n\n## Pre-Merge Checklist\n1. CI: all checks must pass (use `pull_request_read` with get_status).\n2. Reviews: required approvals present, no outstanding changes_requested.\n3. Branch: if behind base, call `update_pull_request_branch`.\n4. Draft: convert to ready with `update_pull_request_draft_state` if needed.\n5. Merge method: match repo conventions (merge, squash, or rebase).\n\nNever merge with failing checks. Never merge draft PRs without converting first.\n",
203+
body: "# Merge Pull Request\n\nVerify a PR is ready and merge it — or close it cleanly if it shouldn't ship.\n\n## Available Tools\n- `pull_request_read` — check status, reviews, and CI\n- `merge_pull_request` — merge the PR\n- `update_pull_request_branch` — update branch if behind base\n- `update_pull_request_draft_state` — convert draft to ready\n- `update_pull_request` / `update_pull_request_state` — change PR state (e.g. close without merging)\n- `actions_get` — check workflow run details\n\n## Pre-Merge Checklist\n1. CI: all checks must pass (use `pull_request_read` with get_status).\n2. Reviews: required approvals present, no outstanding changes_requested.\n3. Branch: if behind base, call `update_pull_request_branch`.\n4. Draft: convert to ready with `update_pull_request_draft_state` if needed.\n5. Merge method: match repo conventions (merge, squash, or rebase).\n\n## Closing without merging\nWhen a PR is superseded, abandoned, or otherwise won't ship, close it instead of leaving it open. Use `update_pull_request_state` (or `update_pull_request` with `state: closed`) and leave a brief comment explaining why and linking to any superseding PR or issue. Don't just close silently.\n\nNever merge with failing checks. Never merge draft PRs without converting first.\n",
203204
}
204205
}
205206

0 commit comments

Comments
 (0)