Skip to content

bitbucket: Implement ChecksByChange with per-status build detail#1267

Open
ed-irl wants to merge 1 commit into
ed-irl/checks-gitlabfrom
ed-irl/checks-bitbucket
Open

bitbucket: Implement ChecksByChange with per-status build detail#1267
ed-irl wants to merge 1 commit into
ed-irl/checks-gitlabfrom
ed-irl/checks-bitbucket

Conversation

@ed-irl

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

Copy link
Copy Markdown
Collaborator

Implements the Bitbucket side of the per-change checks API: rollup
state from the PR head commit's build statuses, plus per-status
name/state/url forwarded as runs[].

  • gateway: CommitStatus grows Key, Name, and URL fields. Existing
    callers and fixtures keep working because the new fields are
    omitempty.
  • rollupFromCommitStatuses collapses Bitbucket build-status
    states to the upstream rollup taxonomy. Failure wins over
    pending wins over passed. Empty list means no CI configured
    -> ChecksNone. Stopped statuses are operator-cancelled
    non-failures and roll up as passed (changed from the merge
    handler's aggregateStatuses, which treated Stopped as Failed;
    that path is preserved for backwards compatibility but no
    longer informs the richer API).
  • ChecksByChange issues getPullRequest + CommitStatusList per
    PR. State is lowercased to match the spec's forge-native
    convention; Name falls back to Key when the build-status
    provider didn't supply a human name.
  • aggregateStatuses (the merge handler's path) keeps its
    pre-existing semantics and is now scoped narrowly so the
    refactor doesn't change merge behavior.

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

Implements the Bitbucket side of the per-change checks API: rollup
state from the PR head commit's build statuses, plus per-status
name/state/url forwarded as runs[].

  - gateway: CommitStatus grows Key, Name, and URL fields. Existing
    callers and fixtures keep working because the new fields are
    omitempty.
  - rollupFromCommitStatuses collapses Bitbucket build-status
    states to the upstream rollup taxonomy. Failure wins over
    pending wins over passed. Empty list means no CI configured
    -> ChecksNone. Stopped statuses are operator-cancelled
    non-failures and roll up as passed (changed from the merge
    handler's aggregateStatuses, which treated Stopped as Failed;
    that path is preserved for backwards compatibility but no
    longer informs the richer API).
  - ChecksByChange issues getPullRequest + CommitStatusList per
    PR. State is lowercased to match the spec's forge-native
    convention; Name falls back to Key when the build-status
    provider didn't supply a human name.
  - aggregateStatuses (the merge handler's path) keeps its
    pre-existing semantics and is now scoped narrowly so the
    refactor doesn't change merge behavior.

Integration fixtures regenerate on the next forgetest -update
pass (real Bitbucket 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