feat(bitbucket): add read-only PR reviews fetch#835
Conversation
|
Hi @potiuk , I opened the next Bitbucket follow-up for #606 based on your guidance to look at what the issue and PR-management skill families need. The PR-management review flow depends on review-state context such as reviewers, approvals, review requests, review decision, and change-request signals, so this PR adds a read-only command:
It fetches review-state activity from Bitbucket Cloud and Bitbucket Data Center, then normalizes reviewers, approvals, change-request / needs-work signals, review requests, review events, and an aggregate This stays within the existing
|
potiuk
left a comment
There was a problem hiding this comment.
Approving — read-only, cleanly scoped, and well-tested (Cloud + Data Center fetch, pagination, normalization, and good precedence cases), and a tidy extension of the existing partial-read-only change-request coverage. One non-blocking note left inline on the Cloud reviewer-merge path; fine to address as a follow-up.
… add regression tests The Cloud _cloud_reviewers participants merge downgraded a requested-but-not- yet-acted reviewer from pending to unknown, dropping them from review_requests and collapsing review_decision to unknown. Only refine a pending request when the participant carries a definite signal (approved / changes_requested).
|
Hi @KatalKavya96 — I pushed a small maintainer commit ( The I applied it directly rather than leaving it as a follow-up because we're about to cut another release candidate (0.1.0-rc2) and want this in it. Thanks for the contribution — nice, well-tested addition! |
Summary
magpie-bitbucket pr reviews <id>as a read-only Bitbucket pull-request review-state fetch command.review_decision.contract:change-requestcoverage to better support the PR-management skill family’s need for review-state context.Type of change
.claude/skills/<name>/) — eval fixtures updated belowtools/<system>/*.md)tools/*/withpyproject.toml)docs/,README.md,CONTRIBUTING.md)projects/_template/)prek, workflows, validators)Test plan
prek run --all-filespassesPYTHONPATH=src uv run --group dev pytest tests/test_bitbucket.pyuv run --group dev ruff check src tests --fixuv run --group dev ruff format src testsuv run --group dev mypy src tests(
PYTHONPATH=tools/skill-evals/src python3 -m skill_evals.runner tools/skill-evals/evals/<skill>/)(a regression test for the bug fixed / the behaviour added — see CONTRIBUTING.md)
RFC-AI-0004 compliance
contract:change-request/Coverage: partial-read-onlyadapter without introducing a new Bitbucket-specific capability contractLinked issues
Refs #606
Notes for reviewers
This follows the recently merged Bitbucket roadmap documentation PR. Based on the next-step guidance to look at what the issue and PR-management skill families need, this PR targets the PR-management review-state gap.
The new command is:
It provides partial read-only review-state context, including:
review_decisionFor Bitbucket Cloud, this uses the pull-request activity feed together with the PR payload. For Bitbucket Data Center, this uses the pull-request payload and activities feed, following the same Data Center activities pattern already used for PR discussion/comments.
This intentionally remains read-only. It does not add comment posting, approvals, request-changes actions, merging, branch edits, issue changes, build triggers, or any other mutation path.