Skip to content

github: Implement ChecksByChange with per-run detail and checks URL#1265

Open
ed-irl wants to merge 1 commit into
ed-irl/checks-shamhubfrom
ed-irl/checks-github
Open

github: Implement ChecksByChange with per-run detail and checks URL#1265
ed-irl wants to merge 1 commit into
ed-irl/checks-shamhubfrom
ed-irl/checks-github

Conversation

@ed-irl

@ed-irl ed-irl commented Jun 13, 2026

Copy link
Copy Markdown
Collaborator

Implements the GitHub side of the per-change checks API: rollup
state, per-run name/state/url for both CheckRun and StatusContext
nodes, and the PR's checks summary page URL.

  • Per-PR GraphQL query over PullRequest.commits(last:1).
    StatusCheckRollup gives us the rollup state and the contexts
    connection (capped at 50 per PR; pagination not yet needed).
  • rollupFromStatusCheckRollupState collapses the StatusState enum
    to the upstream rollup taxonomy. Empty input -> ChecksNone
    distinguishes 'no checks' from 'all passed'. Unknown states
    fall back to ChecksFailed.
  • nativeCheckRunState lower-cases CheckRun.conclusion when status
    is COMPLETED, otherwise CheckRun.status. nativeStatusContextState
    lower-cases StatusContext.state. Forge-native vocabulary is
    preserved in runs[] so future UI surfaces can distinguish
    neutral/cancelled/skipped/timed_out without an upstream API
    change.
  • PullRequest.permalink + '/checks' provides the click target.
  • ChangeChecksState (merge handler) gets a small refactor onto
    the new rollup helper without changing its existing 'no rollup
    -> passed' semantics.

ChecksByChange issues one query per PR. Batched-via-aliases would
be sharper for tall stacks but is awkward in shurcooL/githubv4;
the per-PR queries are cheap relative to the rest of gs ll.

Integration fixtures regenerate on the next forgetest -update
pass (real GH credentials).

Implements the GitHub side of the per-change checks API: rollup
state, per-run name/state/url for both CheckRun and StatusContext
nodes, and the PR's checks summary page URL.

  - Per-PR GraphQL query over PullRequest.commits(last:1).
    StatusCheckRollup gives us the rollup state and the contexts
    connection (capped at 50 per PR; pagination not yet needed).
  - rollupFromStatusCheckRollupState collapses the StatusState enum
    to the upstream rollup taxonomy. Empty input -> ChecksNone
    distinguishes 'no checks' from 'all passed'. Unknown states
    fall back to ChecksFailed.
  - nativeCheckRunState lower-cases CheckRun.conclusion when status
    is COMPLETED, otherwise CheckRun.status. nativeStatusContextState
    lower-cases StatusContext.state. Forge-native vocabulary is
    preserved in runs[] so future UI surfaces can distinguish
    neutral/cancelled/skipped/timed_out without an upstream API
    change.
  - PullRequest.permalink + '/checks' provides the click target.
  - ChangeChecksState (merge handler) gets a small refactor onto
    the new rollup helper without changing its existing 'no rollup
    -> passed' semantics.

ChecksByChange issues one query per PR. Batched-via-aliases would
be sharper for tall stacks but is awkward in shurcooL/githubv4;
the per-PR queries are cheap relative to the rest of gs ll.

Integration fixtures regenerate on the next forgetest -update
pass (real GH credentials).
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