Skip to content

commit-push-pr: include GitHub issue-closing keywords in PR body #491

@lightcap

Description

@lightcap

Problem

The commit-push-pr command (commit-commands plugin) creates PRs with gh pr create but doesn't prompt for or include GitHub issue-closing keywords (Closes #123, Fixes #123, Resolves #123) in the generated PR body.

This means issues that are fully resolved by the PR don't get auto-closed on merge, requiring manual cleanup.

Example

A PR implementing issue #29 was created without any closing keyword reference. The issue had to be manually closed after the PR was merged.

Suggested change

In plugins/commit-commands/commands/commit-push-pr.md, the PR creation step could:

  1. Check whether any related issues exist (e.g., by scanning commit messages or branch names for issue numbers)
  2. Prompt the agent to include a closing keyword line in the PR body, e.g.:
Closes #<issue-number>

Context

GitHub supports these closing keywords in PR bodies (case-insensitive): close, closes, closed, fix, fixes, fixed, resolve, resolves, resolved. When a PR with these keywords targeting an issue is merged into the default branch, the issue is automatically closed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions