Skip to content

BBC2-24 add bb pr checks#28

Open
b2l wants to merge 1 commit into
mainfrom
b2lpowa/bbc2-24-bb-pr-checks
Open

BBC2-24 add bb pr checks#28
b2l wants to merge 1 commit into
mainfrom
b2lpowa/bbc2-24-bb-pr-checks

Conversation

@b2l
Copy link
Copy Markdown
Owner

@b2l b2l commented Apr 27, 2026

Summary

  • bb pr checks [<id>] — show CI check statuses for a PR's head commit
  • Per-check rows: state icon, name, description, URL
  • Summary line: N passed, M failed, K pending
  • Exit code: 0 = all pass, 1 = any failed/stopped, 2 = any in-progress with no failures
  • JSON mode: { checks: [...], summary: { passed, failed, pending } }
  • Defaults to the PR for the current branch (same UX as view/diff/comment)

Test plan

  • bun test — 161 pass, 0 fail
  • bun run lint — clean
  • Backend tests: all pass, any fail, any pending, empty list, missing fields, 404 error
  • bb pr checks <id> on a PR with CI checks
  • bb pr checks (current branch detection)
  • bb pr checks --json <id> structured output
  • Verify exit codes: bb pr checks <green-pr>; echo $? → 0

Show CI check statuses for a pull request's head commit.

- `bb pr checks [<id>]` prints per-check rows (icon, name, description,
  URL) plus a summary line (N passed, M failed, K pending)
- Exit code reflects overall state: 0=all pass, 1=any failed/stopped,
  2=any in-progress with no failures
- JSON mode outputs { checks: [...], summary: { passed, failed, pending } }
- Defaults to the PR for the current branch (same as view/diff/comment)
- Backend: listPullRequestStatuses via GET /pullrequests/{id}/statuses
  with pagination, 6 tests covering all states, missing fields, errors
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.

1 participant