feat(#1409): hive-forge pr-status verb (mergeable, CI, reviews, last comment)
This commit is contained in:
parent
60042d877e
commit
7031f57c14
5 changed files with 394 additions and 1 deletions
|
|
@ -45,6 +45,8 @@ hive-forge lint unassigned # open issues/PRs with no assignee
|
|||
hive-forge lint no-reviewer --reviewer argus # PRs missing a reviewer comment from argus
|
||||
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 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
|
||||
|
|
@ -55,6 +57,34 @@ hive-forge subscription --unwatch # unsubscribe
|
|||
|
||||
`hive-forge <verb> --help` prints the full signature for any verb.
|
||||
|
||||
### `pr-status`
|
||||
|
||||
One-stop PR health view (`--pr <n>`): mergeable state, CI checks,
|
||||
requested reviewers + review verdicts, and the last-comment timestamp —
|
||||
the things you need to know whether a PR is ready to merge (CI must pass
|
||||
before merge). `--sha <sha>` is a CI-only fast path for a raw commit.
|
||||
|
||||
A failing/erroring CI context prints its job link. The process exit code
|
||||
is a **merge-readiness** verdict for `--pr` (0 only when CI is green AND
|
||||
the PR is mergeable AND no review requests changes), so it composes:
|
||||
`hive-forge pr-status --pr 42 && echo ready`. `--sha` mirrors the CI
|
||||
verdict alone.
|
||||
|
||||
```
|
||||
hive-forge pr-status --pr 42
|
||||
# PR #42: feat(...): ...
|
||||
# state: open (mergeable: yes)
|
||||
# CI: e39a87ea3949: ✅ success (1 context(s))
|
||||
# ✅ CI / nix flake check (pull_request): success — Successful in 1m50s
|
||||
# reviewers: (none requested)
|
||||
# reviews: ✅ argus: APPROVED
|
||||
# last comment: 2026-06-05T19:13:28+02:00 by argus
|
||||
```
|
||||
|
||||
Note: review verdicts come from *formal* Forgejo reviews (the
|
||||
approve / request-changes API). Reviewers who post their verdict as a
|
||||
plain comment show under `last comment`, not `reviews`.
|
||||
|
||||
## Notes
|
||||
|
||||
- `comment --body "..."` with backticks in the body: always use
|
||||
|
|
|
|||
Loading…
Reference in a new issue