Skip to content

feat(bitbucket): add guarded cloud PR request-changes actions - #1192

Merged
potiuk merged 1 commit into
apache:mainfrom
KatalKavya96:feat-bitbucket-cloud-pr-request-changes
Sep 10, 2026
Merged

feat(bitbucket): add guarded cloud PR request-changes actions#1192
potiuk merged 1 commit into
apache:mainfrom
KatalKavya96:feat-bitbucket-cloud-pr-request-changes

Conversation

@KatalKavya96

Copy link
Copy Markdown
Contributor

Summary

Adds guarded Bitbucket Cloud pull-request change-request mutations to the existing Bitbucket bridge.

This PR adds:

  • magpie-bitbucket pr request-changes <id>
  • magpie-bitbucket pr remove-request-changes <id>

These commands operate on Bitbucket Cloud only. Bitbucket Data Center change-request writes remain explicitly unsupported in this PR.

Implementation

  • Adds Bitbucket Cloud request-changes using POST.
  • Adds Bitbucket Cloud remove-request-changes using DELETE.
  • Reuses the guarded shared write path added for approve/unapprove.
  • Adds explicit Data Center fail-closed behavior.
  • Adds normalized change-request mutation output.
  • Adds CLI dispatch for both new actions.
  • Keeps the broader post_review contract marked as not implemented.

Safety / write-path discipline

These remain explicit caller-confirmed mutations.

The bridge does not request or remove requested changes automatically. The calling skill is responsible for obtaining explicit user confirmation before invoking either mutation.

Authenticated writes continue to use the existing HTTPS-only, no-auth-redirect mutation path.

Tests

Added coverage for:

  • Cloud request-changes using POST with no request body
  • Cloud remove-request-changes using DELETE with an empty response body
  • normalized request/remove-request results
  • CLI dispatch for both actions
  • Data Center fail-closed behavior

Validation completed successfully:

  • focused request-changes tests
  • full Bitbucket test suite
  • Ruff
  • Ruff format check
  • mypy
  • repository prek hooks
  • git diff --check

Scope

This intentionally remains a narrow follow-up to #606.

It does not add:

  • full post_review
  • PR decline
  • PR merge
  • Data Center change-request writes

@KatalKavya96

Copy link
Copy Markdown
Contributor Author

Hi @potiuk — this is the next narrow #606 follow-up after the approve/unapprove PR.

It adds guarded Bitbucket Cloud pr request-changes / pr remove-request-changes actions, reuses the existing HTTPS + no-auth-redirect write path, keeps Data Center change-request writes fail-closed, and still leaves full post_review intentionally unimplemented.

Focused tests, the full Bitbucket suite, Ruff, mypy, prek hooks, and git diff --check are all green.

Would appreciate your review when you get a chance.

@potiuk
potiuk merged commit 74776c8 into apache:main Sep 10, 2026
9 checks passed
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.

2 participants