Skip to content

feat(native): label the checks that gate a pull request's merge - #820

Merged
omartelo merged 2 commits into
mainfrom
feat/native-required-checks
Oct 17, 2026
Merged

omartelo merged 2 commits into
mainfrom
feat/native-required-checks

Conversation

@omartelo

Copy link
Copy Markdown
Collaborator

What

The native Pulls screen's Checks tab marks the checks that gate the merge with a Required pill, the way GitHub's own checks list does.

How

  • gh pr view --json statusCheckRollup does not carry isRequired (it takes the pull request as an argument), so PullRequestDetail makes one GraphQL call for it, only when the PR reports checks. It covers both rulesets and classic branch protection.
  • Checks are matched by name + URL: a name repeats across workflows (test runs in both ci and native).
  • A failed lookup fails the detail read; no silent fallback.
  • CheckItem gains required, mirrored in native/lichclient and frontend/src/lib/api-types.ts. The web UI does not render it (maintenance mode).
  • The pill reuses paletteChip; the word lands in all 7 native locales.

Notes

  • Measured against chore: move the repository to the lichdotdev organization #818: both test checks (ci and native) read required, which is GitHub's answer: the main ruleset requires context test with no app pinned.
  • The query reads the first 100 checks; a check beyond that never reads Required.
  • pr-handoff.test.ts fixture gains required: false: the contract changed (new required field on CheckItem).

Verification

  • go test ./internal/project/ (3 new tests), go vet ./internal/..., gofmt
  • native/: gofmt, go vet ./..., go test ./...
  • frontend: biome ci ., tsc -b, vitest run src/lib/pulls
  • Not taken: a -shot of the tab (it cannot navigate to a PR's Checks tab).

gh pr view --json statusCheckRollup carries no isRequired, so the detail
asks GitHub's GraphQL for it once the pull request reports checks, and
the native Checks tab marks those rows Required, as GitHub's own list does.
@omartelo
omartelo merged commit 1f9beca into main Oct 17, 2026
9 checks passed
@omartelo
omartelo deleted the feat/native-required-checks branch October 17, 2026 22:59
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