Skip to content

feat: github_merge_pr: optional subject/body (gh pr merge --subject/--body), refused on rebase, shown in dry run - #45

Merged
mabry1985 merged 1 commit into
mainfrom
feat/bd-dh0l-github-merge-pr-optional-subject-body-gh
Oct 22, 2026
Merged

mabry1985 merged 1 commit into
mainfrom
feat/bd-dh0l-github-merge-pr-optional-subject-body-gh

Conversation

@mabry1985

Copy link
Copy Markdown
Member

Summary

github_merge_pr now accepts optional subject and body params (placed after delete_branch, before dry_run/confirm, so every existing call stays valid). When set, they're appended to the gh argv as ["--subject", subject] / ["--body", body] after --<method> and --delete-branch. Because a single-commit squash takes the commit's subject (not the PR title) — which is how design-system-plugin#48 landed with the wrong subject and skipped its release workflow — this lets callers pin the exact subject that lands on main. A rebase merge ignores these, so passing either with method="rebase" returns an Error before any gh call. The dry-run preview now echoes the exact subject/body for operator confirmation, and the no-subject/no-body preview is unchanged. The pr.merged event payload is unchanged and no version bump is included (that ships on a separate release card).

Fixes #44

@protoreview protoreview Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QA panel review — PASS

code-review · head e5da11f50442 · formal

Low-risk change: a single test-assertion style nit. The panel found no correctness, security, or logic issues. The one finding is a confirmed nit — a new test asserts only the tail of argv (args[-6:]) while its sibling test in the same diff uses the full-argv pattern. No action needed before merge; fix at author's discretion. Verification confirmed the code matches the quoted evidence and the in-file inconsistency is real.

Findings

Severity Location Finding Verified
⚪ nit tests/test_write_tools.py:465 test_merge_pr_merge_with_subject_body_and_delete_branch asserts only the last 6 argv elements (args[-6:]) instead of the full argv, deviating from the repo's s… confirmed
findings JSON (machine-readable)
[
  {
    "file": "tests/test_write_tools.py",
    "line": 465,
    "severity": "nit",
    "category": "conventions",
    "claim": "test_merge_pr_merge_with_subject_body_and_delete_branch asserts only the last 6 argv elements (args[-6:]) instead of the full argv, deviating from the repo's stated convention (\"asserts the exact argv\") and the established pattern in the same file.",
    "evidence": "assert args[-6:] == [\"--merge\", \"--delete-branch\", \"--subject\", \"a subject\", \"--body\", \"a body\"]",
    "verdict": "confirmed",
    "note": "Code at PR head line 462 matches the quoted evidence exactly; the sibling test in the same diff uses full-argv assertion (args == [...]), confirming the pattern deviation. The 'stated convention' sub-claim is unverified (no doc fetched) but the in-file inconsistency is clear.",
    "line_original": 462,
    "line_corrected": true
  }
]

@protoreview protoreview Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Promoting the PASS verdict for head e5da11f50442: all checks terminal-green, zero unresolved review threads. (approve-on-green)

Open findings carried by this approval — non-blocking, but they did not go away:

  • nit tests/test_write_tools.py:465 — test_merge_pr_merge_with_subject_body_and_delete_branch asserts only the last 6 argv elements (args[-6:]) instead of the full argv, deviating from the repo's stated convention ("asserts the exact argv

Approving a WARN does not resolve its findings (issue #22).

@mabry1985
mabry1985 merged commit 7859de8 into main Oct 22, 2026
4 checks passed
@mabry1985
mabry1985 deleted the feat/bd-dh0l-github-merge-pr-optional-subject-body-gh branch October 22, 2026 23:37
@mabry1985 mabry1985 mentioned this pull request Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

github_merge_pr: add optional subject/body params (gh pr merge --subject/--body)

1 participant