feat(bitbucket): add read-only branch restrictions fetch#857
Open
KatalKavya96 wants to merge 3 commits into
Open
feat(bitbucket): add read-only branch restrictions fetch#857KatalKavya96 wants to merge 3 commits into
KatalKavya96 wants to merge 3 commits into
Conversation
Contributor
Author
|
Hi @potiuk, I opened the next Bitbucket follow-up for #606. This PR adds: magpie-bitbucket repo restrictionsIt fetches read-only repository branch restriction / branch permission context for Bitbucket Cloud and Data Center, including pagination, and normalizes restriction kind/type, branch pattern/matcher, users, groups, access keys where exposed, and raw payloads. This remains partial read-only. Data Center may require
|
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 repo restrictionsas a read-only Bitbucket repository branch restriction / branch permission context command.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.py -qPYTHONPATH=src uv run --group dev pytest tests/test_bitbucket.py -q -k "restrictions"uv 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 complete Bitbucket-specific source-control contractLinked issues
Refs #606
Notes for reviewers
This follows the recently merged Bitbucket read-only PR review-state and merge-check context commands and targets the next repository-context gap from the partial read-only roadmap.
The new command is:
It fetches repository-level branch restriction / branch permission context:
The normalized output includes restriction kind/type, branch matcher or pattern context, users, groups, access keys where exposed, permission-required metadata for Data Center, and raw backend payloads.
This is intentionally partial and read-only. Bitbucket Data Center branch permission search may require
REPO_ADMIN, so the README documents that the command is permission-dependent. This PR does not mutate branch restrictions, repository permissions, access rules, pull requests, builds, issues, or repository content.