Repository navigation
feat(bitbucket): resolve cloud merge task status - #1577
Merged
potiuk merged 2 commits intoOct 10, 2026
Merged
Conversation
…ailed tasks The read-only merge-task-status command reused the merge normaliser and so reported `operation: pull-request-merge`, which a caller cannot tell apart from a merge submission. The normaliser now takes the operation, and the status read reports `pull-request-merge-task-status` with the same merge_status / landed_ref vocabulary. Also cover the failed path the README documents: FAILED and ERROR task states normalise to merge_status=failed. Generated-by: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01GTPsZ5aEE5bUVYqp47Dpvv
potiuk
approved these changes
Oct 10, 2026
potiuk
left a comment
Member
There was a problem hiding this comment.
LGTM — a narrow, read-only command with the task URL built only from configured values and quoted path segments, Data Center failing closed before any request, and CI green.
Two small nits, which I pushed as a follow-up commit on the branch (d4f9bb5) rather than asking for another round:
- The status read reused the merge normaliser and reported
"operation": "pull-request-merge", which a caller cannot tell apart from a merge submission. It now reportspull-request-merge-task-status, with the samemerge_status/landed_refvocabulary. - The failed path the README documents is now tested:
FAILEDandERRORtask states normalise tomerge_status=failed.
This review was drafted by an AI-assisted tool and
confirmed by an Apache Magpie maintainer. The maintainer
approving this PR has read the findings and signed off. If
something feels off, please reply on the PR and a maintainer
will follow up.More on how Apache Magpie handles maintainer review:
Contributing guide.
9 of 21 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #1471 and part of #606.
Bitbucket Cloud can accept a pull-request merge asynchronously with HTTP 202 and return a merge task. #1471 preserved that task metadata, but resolving the task into the eventual
landed_refwas left as follow-up work.This adds a narrow read-only command for that flow:
magpie-bitbucket pr merge-task-status <id> <task-id>The command:
merge_status=submittedmerge_status=mergedmerge_result.merge_commit.hashaslanded_refmerge_status=failedTest plan
git diff --checkpassesprekhooks pass, including workspace pytest