feat(bitbucket): add guarded cloud PR comment create - #1142
Open
KatalKavya96 wants to merge 1 commit into
Open
Conversation
Contributor
Author
|
Hi @potiuk, this continues the guarded Bitbucket write rollout after #1078. This adds one narrow mutation: top-level Bitbucket Cloud PR comment creation via It deliberately reuses the existing write-path protections from issue-comment creation: caller-side confirmation, body-file-only input, HTTPS enforcement, redirect rejection, and quoted path segments. Data Center PR comment writes remain explicitly unsupported in this PR. Tests cover the POST request/body, normalization, CLI success, Data Center rejection, and missing/empty body failures before any write occurs. |
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
magpie-bitbucket pr comment <id> --body-file <path>for creating a top-level Bitbucket Cloud pull-request comment.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
For Python packages touched: full Bitbucket pytest suite passes
ruff check src testspassesruff format --check src testspassesmypy src testspassesgit diff --checkpassesFocused PR-comment tests cover:
prek run --all-filespassesFor Groovy bridges touched: command-line invocation tested end-to-end
For skill changes: eval suite passes for the affected skill
For skill behaviour changes: a new or updated eval fixture is included
RFC-AI-0004 compliance
Linked issues
Refs #606
Follow-up to #1078
Notes for reviewers
This is the next narrowly scoped Bitbucket write after Cloud issue-comment creation.
The new command is:
Implementation details:
--body-filepost_json(), including HTTPS enforcement and redirect rejectionOut of scope for this PR: inline comments, comment edits/deletion, PR task mutation, review submission, approve/unapprove, decline, merge, PR creation/editing, issue mutation, or build mutation.