You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(bitbucket): Cloud pr status omits the pull request state and head commit #1495
On Bitbucket Cloud, pr status goes through cloud.get_pull_request_status() (tools/bitbucket/src/magpie_bitbucket/cloud.py:495-510). It fetches only the /statuses endpoint and returns:
normalize.pull_request_status() (normalize.py:306-327) reads the state from raw["pull_request"] and the head commit from raw["commit"]. The Cloud payload has neither, so every Cloud pr status reports "state": "unknown" and "commit": null, whatever the pull request's real state. The Data Center backend sets both keys (datacenter.py:277-300), so it is only Cloud.
cloud.get_pull_request_merge_checks() (cloud.py:476-492) already works around the gap: it falls back to the reviews payload when status.get("pull_request") is missing.
test_cli_pr_status_cloud (tests/test_bitbucket.py:878-887) mocks get_pull_request_status() with a hand-built dict that has a commit key the Cloud backend never produces, so the real Cloud payload is never exercised and the test passes.
Why it matters
state is what a caller uses to tell an open pull request from a merged or declined one before acting on its checks. The impact is low today: no skill binds to this adapter yet (pr-triage/contract-binding.md names github, jira-patch and mail-patch as change-request backends). The build checks themselves are reported correctly; it is the pull request metadata that is missing, although the API has it.
Suggested fix
Have Cloud get_pull_request_status() also fetch the pull request and return it under pull_request, with the source commit under commit, the shape Data Center already returns.
Test the Cloud path from the backend's real output: either record the fixture from get_pull_request_status(), or go through the CLI with a fake transport, as tools/gitlab/tests/conftest.py does.
Activity
fix(bitbucket): report pull request state and source commit in Cloud …
feat(bitbucket): add guarded cloud PR merge (#1471)
feat(tools): add asf-nexus and wire Nexus staging check into verify-rc (