Skip to content

feat(bitbucket): add read-only cloud issue comments fetch#864

Open
KatalKavya96 wants to merge 1 commit into
apache:mainfrom
KatalKavya96:feat-bitbucket-cloud-issue-comments
Open

feat(bitbucket): add read-only cloud issue comments fetch#864
KatalKavya96 wants to merge 1 commit into
apache:mainfrom
KatalKavya96:feat-bitbucket-cloud-issue-comments

Conversation

@KatalKavya96

Copy link
Copy Markdown
Contributor

Summary

  • Adds magpie-bitbucket issue comments <id> for read-only Bitbucket Cloud issue comment fetching where the repository issue tracker is enabled.
  • Extends the partial contract:tracker coverage added by Cloud issue list/get with read-only issue discussion context, while keeping Bitbucket Data Center native issue comments explicitly unsupported with linked Jira handoff guidance.
  • Normalizes Cloud issue comments into stable partial read-only tracker context without adding issue comment creation, edits, deletion, state transitions, assignment changes, or any repository mutation path.

Type of change

  • Skill change (.claude/skills/<name>/) — eval fixtures updated below
  • Tool / bridge contract (tools/<system>/*.md)
  • Python package (tools/*/ with pyproject.toml)
  • Groovy reference impl
  • Cross-cutting (RFC, AGENTS.md, sandbox, privacy-LLM)
  • Documentation (docs/, README.md, CONTRIBUTING.md)
  • Project template (projects/_template/)
  • CI / dev loop (prek, workflows, validators`)
  • Other:

Test plan

  • prek run --all-files passes
  • For Python packages touched: PYTHONPATH=src uv run --group dev pytest tests/test_bitbucket.py -q -k "issue_comments or issue_comment"
  • For Python packages touched: PYTHONPATH=src uv run --group dev pytest tests/test_bitbucket.py -q
  • For Python packages touched: uv run --group dev ruff check src tests --fix
  • For Python packages touched: uv run --group dev ruff format src tests
  • 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)
  • Other: git diff --check passes

RFC-AI-0004 compliance

  • HITL — no mutation behaviour is added; the new command is read-only
  • Sandbox — no new unrestricted host access; Bitbucket network reach remains declared in the adapter
  • Vendor neutrality — extends the existing Bitbucket contract:change-request / partial contract:tracker bridge without claiming complete backend parity
  • Conversational + correctable — agentic-override path remains documented for adopter-tunable behaviour
  • Write-access discipline — this PR only reads Cloud issue comments and does not create, edit, delete, resolve, assign, or otherwise mutate issues, comments, PRs, builds, or repository state
  • Privacy LLM — fetched issue comments, commenter 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 Cloud issue read PR and adds the next conservative tracker-side read.

The new command is:

magpie-bitbucket issue comments <id>

Scope is intentionally narrow:

  • Bitbucket Cloud: supports read-only issue comment fetching with pagination where the repository issue tracker is enabled.
  • Bitbucket Data Center: native Bitbucket issue comments are explicitly unsupported and return a clear error pointing toward linked Jira coverage instead.

The normalized output includes issue ID, comment ID, author, body, timestamps, permalink, participants, labels/coverage context, and raw backend payloads.

This remains partial read-only. It does not add issue comment creation, edits, deletion, assignment changes, state transitions, linked Jira handoff, PR mutation, build mutation, or repository content changes.

@KatalKavya96

Copy link
Copy Markdown
Contributor Author

Hi @potiuk, I opened the next Bitbucket follow-up for #606.

This adds read-only Cloud issue comment fetching:

magpie-bitbucket issue comments <id>

It keeps the same partial contract:tracker scope, with Data Center native issue comments explicitly unsupported and pointed toward linked Jira coverage.

Targeted pytest, ruff, mypy, and git diff --check are passing.

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.

1 participant