feat(hive-forge): add pr-merge verb (#1670)
Adds `hive-forge pr-merge <n> [--method merge|rebase] [--keep-branch]
[--force]` wrapping POST /repos/{owner}/{repo}/pulls/{n}/merge, so agents on
the peer-review-and-merge workflow have a CLI path instead of the raw API.
- Methods: merge (default) | rebase. Squash is intentionally not offered.
- Deletes the head branch after merge unless --keep-branch.
- Safe by default: refuses unless the PR is mergeable, CI is not red, and no
review's current verdict requests changes (latest-per-reviewer wins, so a
later approval clears an earlier request-changes). --force overrides and
also sets Forgejo's force_merge.
- New client helper post_no_content for the 200-empty-body merge response.
This commit is contained in:
parent
06c5d68071
commit
9d8367bb24
5 changed files with 231 additions and 0 deletions
|
|
@ -47,6 +47,9 @@ hive-forge lint stale-branches --days 14 # branches with no recent activity
|
|||
hive-forge lint assignments # per-assignee open item count
|
||||
hive-forge pr-status --pr 42 # PR health: mergeable, CI, reviews, last comment (exit 0 = ready)
|
||||
hive-forge pr-status --sha <sha> # CI-only fast path for an explicit commit sha
|
||||
hive-forge pr-merge 42 # merge (refuses unless mergeable + CI not red + no changes-requested); deletes head branch
|
||||
hive-forge pr-merge 42 --method rebase # rebase-merge instead of a merge commit (no squash option)
|
||||
hive-forge pr-merge 42 --keep-branch --force # keep the head branch; override the readiness gate
|
||||
hive-forge timeline 42 # audit trail: closes, label changes, assignments, commit refs
|
||||
hive-forge attach-issue 42 /path/to/file # upload a file attachment to an issue; prints download URL
|
||||
hive-forge attach-comment 18042 /path/to/file # upload a file attachment to a comment; prints download URL
|
||||
|
|
|
|||
Loading…
Reference in a new issue