You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@magpie.apache.org by "KatalKavya96 (via GitHub)" <gi...@apache.org> on 2026/07/14 11:29:18 UTC
[PR] feat(bitbucket): add read-only cloud issue fetch [magpie]
KatalKavya96 opened a new pull request, #863:
URL: https://github.com/apache/magpie/pull/863
## Summary
* Adds `magpie-bitbucket issue list-open` and `magpie-bitbucket issue get <id>` for read-only Bitbucket Cloud issue listing/fetching where the repository issue tracker is enabled.
* Starts partial `contract:tracker` coverage for the Bitbucket bridge while keeping Bitbucket Data Center native issue reads explicitly unsupported and pointing linked Jira coverage to separate follow-up work.
* Normalizes Cloud issue output into stable partial read-only tracker context without adding issue writes, comments, assignment changes, state changes, or repository mutation paths.
## Type of change
* [ ] Skill change (`.claude/skills/<name>/`) — eval fixtures updated below
* [x] Tool / bridge contract (`tools/<system>/*.md`)
* [x] Python package (`tools/*/` with `pyproject.toml`)
* [ ] Groovy reference impl
* [x] Cross-cutting (RFC, AGENTS.md, sandbox, privacy-LLM)
* [x] Documentation (`docs/`, `README.md`, `CONTRIBUTING.md`)
* [ ] Project template (`projects/_template/`)
* [x] CI / dev loop (`prek`, workflows, validators)
* [ ] Other:
## Test plan
* [x] `prek run --all-files` passes
* [x] For Python packages touched: `PYTHONPATH=src uv run --group dev pytest tests/test_bitbucket.py -q`
* [x] For Python packages touched: `PYTHONPATH=src uv run --group dev pytest tests/test_bitbucket.py -q -k "issue"`
* [x] For Python packages touched: `uv run --group dev ruff check src tests --fix`
* [x] For Python packages touched: `uv run --group dev ruff format src tests`
* [x] For Python packages touched: `uv run --group dev mypy src tests`
* [ ] For Groovy bridges touched: command-line invocation tested end-to-end
* [ ] For skill changes: eval suite passes for the affected skill
(`PYTHONPATH=tools/skill-evals/src python3 -m skill_evals.runner tools/skill-evals/evals/<skill>/`)
* [ ] For skill *behaviour* changes: a new or updated eval fixture is included in this PR
(a regression test for the bug fixed / the behaviour added — see CONTRIBUTING.md)
* [x] Other: `uv.lock` was updated by the current workspace hook/uv resolution used during validation.
## RFC-AI-0004 compliance
* [x] **HITL** — no mutation behaviour is added; the new commands are read-only
* [x] **Sandbox** — no new unrestricted host access; Bitbucket network reach remains declared in the adapter
* [x] **Vendor neutrality** — extends the existing Bitbucket `contract:change-request` / `Coverage: partial-read-only` bridge with partial Cloud-only `contract:tracker` reads without claiming complete backend parity
* [x] **Conversational + correctable** — agentic-override path remains documented for adopter-tunable behaviour
* [x] **Write-access discipline** — this PR only reads Cloud issue context and does not create, edit, comment on, assign, close, reopen, or otherwise mutate issues or repository state
* [x] **Privacy LLM** — fetched issue titles/descriptions, reporter/assignee names, links, and raw Bitbucket payloads remain external data and are emitted as read-only bridge output for the caller to handle under existing privacy/approved-LLM rules
## Linked issues
Refs #606
## Notes for reviewers
This follows the recently merged Bitbucket read-only PR/repo context commands and starts the missing tracker side of #606 conservatively.
The new commands are:
```bash
magpie-bitbucket issue list-open
magpie-bitbucket issue get <id>
```
Scope is intentionally narrow:
* Bitbucket Cloud: supports read-only issue listing/fetching where the repository issue tracker is enabled.
* Bitbucket Data Center: native Bitbucket issue reads are explicitly unsupported and return a clear error pointing toward linked Jira coverage instead.
The normalized output includes issue ID, title, state, kind, priority, reporter, assignee, timestamps, permalink, description, labels, and raw backend payloads.
This remains partial read-only. It does not add issue creation, issue edits, comments, assignment changes, state transitions, linked Jira handoff, PR mutation, build mutation, or repository content changes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@magpie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat(bitbucket): add read-only cloud issue fetch [magpie]
Posted by "KatalKavya96 (via GitHub)" <gi...@apache.org>.
KatalKavya96 commented on PR #863:
URL: https://github.com/apache/magpie/pull/863#issuecomment-4968667415
Hi @potiuk, I opened the next Bitbucket follow-up for #606.
This PR adds read-only Bitbucket Cloud issue reads:
```bash
magpie-bitbucket issue list-open
magpie-bitbucket issue get <id>
```
It starts partial `contract:tracker` coverage for the Bitbucket bridge by listing/fetching Cloud issues where the repository issue tracker is enabled. Bitbucket Data Center native issue reads are kept explicitly unsupported and point toward linked Jira coverage instead.
This remains partial read-only and does not add issue creation, edits, comments, assignment changes, state transitions, PR mutations, build mutations, or repository content changes.
`prek run --all-files` and targeted Bitbucket pytest/ruff/mypy checks are passing.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@magpie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat(bitbucket): add read-only cloud issue fetch [magpie]
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk merged PR #863:
URL: https://github.com/apache/magpie/pull/863
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@magpie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat(bitbucket): add read-only cloud issue fetch [magpie]
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on code in PR #863:
URL: https://github.com/apache/magpie/pull/863#discussion_r3580142135
##########
tools/bitbucket/src/magpie_bitbucket/cloud.py:
##########
@@ -80,6 +80,41 @@ def get_repository_restrictions(config: BitbucketConfig) -> dict[str, Any]:
return combined
+def list_open_issues(config: BitbucketConfig) -> dict[str, Any]:
+ """List open issues from a Bitbucket Cloud repository."""
+ workspace = quote_path(require(config.workspace, "BITBUCKET_WORKSPACE"))
+ repo_slug = quote_path(require(config.repo_slug, "BITBUCKET_REPO_SLUG"))
+ url = f"{CLOUD_API_BASE}/repositories/{workspace}/{repo_slug}/issues?q=state%3D%22new%22%20OR%20state%3D%22open%22"
Review Comment:
Non-blocking: this filters `state="new" OR state="open"`, but Bitbucket Cloud issues also have an `on hold` state, which is unresolved/active — a `list-open` caller would probably expect those too. Would you be OK adding `OR state="on hold"` to the query (plus a small test)? `_normalize_issue_state` already passes unknown states through, so it'd surface as `on_hold`. Totally fine to keep the strict new/open scope instead if you prefer — just note the exclusion in the README in that case. What do you think?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@magpie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat(bitbucket): add read-only cloud issue fetch [magpie]
Posted by "KatalKavya96 (via GitHub)" <gi...@apache.org>.
KatalKavya96 commented on PR #863:
URL: https://github.com/apache/magpie/pull/863#issuecomment-4971383327
Thanks @potiuk, that makes sense. I added `state="on hold"` to the Cloud `issue list-open` query and updated the test so unresolved on-hold issues are included in active issue reads too.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@magpie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org