Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat(pull-requests): Bitbucket Data Center pull requests #18242

ClosedOhadC(GitHub profile, opens in a new tab)wants to merge 3 commits intomain fromrefs/pull/18242/headopened View on GitHub

With repositories in place (#18241), Bitbucket Data Center pull requests still don't show up in T3 Code: no list, detail, diff, or review. This PR adds the Data Center pull request provider over REST 1.0. Proposed in #10837. It is the top of the stack (#18240, #18241). Only the last commit is new here. GitHub can't base a PR on a fork branch, so this one targets main and also shows the commits below it.

Summary

 bitbucket-server driver
-  pullRequests: null
+  pullRequests: BitbucketServerPullRequestProvider
+    BitbucketServerPullRequestApi.ts     # REST 1.0 calls
+    bitbucketServerPullRequestJson.ts    # Data Center JSON -> provider records
  • Reads: listing (Authored and Reviewing filters, search), detail, timeline, diff, build status as checks, and the head SHA for the PR watch.
  • Writes: comments, inline comments and replies, reviews (comment, approve, request changes), requesting reviewers with a candidate list, editing the title, body, and comments, merge (merge, squash, rebase), decline, reopen, and checkout from refs/pull-requests/N/from.
  • Permissions: merge is offered only when the token has write permission on the repository. That is the one per-caller permission Data Center exposes.
  • Declared off in capabilities: reactions (Data Center's REST API has none) and resolving threads. Viewed files isn't declared.
  • Outside the package: the bitbucket-server entry in PROVIDER_REQUIREMENT (contracts) and the provider layer in builtInDrivers.ts.

Evidence

Driven in a dev server against a real Data Center instance with a throwaway personal repository. The comments shown were written through this provider during that run.

Before: no Data Center pull requestsAfter: listed next to GitHub's
l3-before-listl3-after-list
Detail with commentsDiff with an inline thread
l3-after-detaill3-after-diff

Tests: BitbucketServerPullRequestApi.test.ts, BitbucketServerPullRequestProvider.test.ts, bitbucketServerPullRequestJson.test.ts. Typecheck and knip pass.

Merge Danger

Door: two-way

Blast Radius: Data Center only

Every change is behind the bitbucket-server kind. Pull request sync now reads Data Center PRs on the one-minute sweep, against the configured host only.

🤖 Generated with Claude Code — Claude Opus 5.5 in T3 Code

    1. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched

    2. Note

      This comment is posted by Julius' dot

      This adds a new Data Center pull request workflow, including reviews and merge actions. #10837 still asks for maintainer sign-off on its direction and scope. I'm closing this under the prior-approval requirement, which also applies to drafts. Please obtain approval in that discussion and link it when requesting reconsideration.

    3. juliusmarminge closed this

Sign in to join this conversation.