GeezerVison is showing github.com — fix(bitbucket): a fork's pull request from a same-named branch no longer hides the branch's own by saphid · Pull Request #29751 · pingdotgg/t3code
Conversation
Problem
On a Bitbucket repository, a branch's own open pull request can go missing when a fork has an open pull request from a branch with the same name, such as main, develop or fix-typo, and that fork's pull request was updated more recently. Status then shows no pull request for the branch and offers to create one.
The branch lookup asks the provider for one open pull request per head selector, then drops rows that come from another owner. Bitbucket's listing matches source.branch.name in every fork, ignores the selector's owner, and returns the most recently updated match. So the fork's pull request takes the single slot, GitManager rejects it, and the branch's own pull request is never read.
Change
Bitbucket gets a headBranchProbe, the same as GitHub's. It drops owner:branch selectors, because Bitbucket ignores the owner and they repeat the bare-branch query. It also reads 50 rows, Bitbucket's maximum page size, which BitbucketApi already clamps to. GitManager always includes the bare head branch among the selectors and still checks owners itself, as the headBranchProbe contract describes ("The caller verifies owners, so hosts may drop unsupported owner:branch selectors"). Each lookup still sends one request per selector, and now fewer selectors are queried.
Scope and approval
Very small, focused fix for an obvious bug, so no prior issue: one provider adopts an existing hook in the way its GitHub sibling already does, for a lookup that returns the wrong answer today. 5 non-test lines.
Overlap search: the closest PR is #27890 (closed, GitCafe), which hit the same "fork pull request takes the limit-1 slot" problem and gave GitCafe a probe; it wasn't merged and didn't touch Bitbucket. #17617 introduced headBranchProbe for GitHub only. No open PR changes Bitbucket's branch lookup. Forgejo, GitLab, Azure DevOps and GitCafe have the same limit-1 exposure, but each needs its own decision (Forgejo, for example, pages until it fills the limit), so they're left out of this PR.
Verification
- New
BitbucketSourceControlProvider.test.ts case fails on main: AssertionError: expected undefined to deeply equal { headSelectors: [ 'feature' ], limit: 50 }. It passes with the fix.
vp test run src/server/ in packages/source-control-bitbucket: 6 files, 93 tests pass.
vp run check:changed: format, lint, knip, typecheck (11 packages) and tests pass.
- Not checked: no live Bitbucket workspace with a forked pull request was available. The behavior follows from the listing query (
source.branch.name plus sort=-updated_on, pagelen=min(limit, 50)) and from GitManager's owner check.
Reviewed with sol-loop: 1 round with GPT-6.1 Sol on high. Sol verdict: approved.
Created with Claude Opus 5.5 in Claude Code (T3 Code).
🤖 Generated with Claude Code
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Approvability
Verdict: Approved at 10717d2
Macroscope's review found this PR approvable — Bitbucket branch lookups now examine up to 50 pull requests using supported branch selectors, while retaining existing repository and owner filtering. The change is limited to discovery and introduces no material operational or data risk.
You can add or adjust custom eligibility rules. Learn more.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|

No actionable comments were generated in the recent review.
Recent review info
-
Run configuration
-
Commits
-
Reviewing files that changed from the base of the PR and between 5b9731c and 10717d2.
Files selected for processing: 2
-
packages/source-control-bitbucket/src/server/BitbucketSourceControlProvider.test.ts
packages/source-control-bitbucket/src/server/BitbucketSourceControlProvider.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.
Walkthrough
-
The Bitbucket provider now filters head-branch probe selectors that contain : and sets the probe limit to 50. A test checks the returned selectors and limit.
Changes: Bitbucket head-branch probe
| Layer / File(s) |
Summary |
Add and test probe options packages/source-control-bitbucket/src/server/BitbucketSourceControlProvider.ts, packages/source-control-bitbucket/src/server/BitbucketSourceControlProvider.test.ts |
The provider excludes selectors containing : and sets the probe limit to 50. The test checks the returned selectors and limit. |
Estimated code review effort: 2 (Simple) | ~8 minutes
Change: Bug fix
Possibly related issues
Possibly related PRs
- pingdotgg/t3code#13200: This PR applies a related lookup strategy for GitHub by removing unsupported selectors and increasing the query limit.
- pingdotgg/t3code#27890: This PR addresses branch collisions on GitCafe and increases the head-branch probe limit.
Suggested labels: size:XS
Suggested reviewers: juliusmarminge, macroscopeapp
Merge Risk: Minimal · up to 10717
-
The probe change has focused regression coverage, with no remaining merge-blocking risk identified.
Pre-merge checks: 4
-
| Check name |
Status |
Explanation |
| Title check |
 |
The title clearly and concisely describes the Bitbucket fix for same-named fork branches hiding the repository's own pull request. |
| Description check |
 |
The description includes complete Problem, Change, Scope and approval, and Verification sections. It explains the failure mode, implementation, scope rationale, focused test results, broader checks, a… |
| Linked Issues check |
 |
Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check |
 |
Check skipped because no linked issues were found for this pull request. |
Full details: Description check
-
Explanation
The description includes complete Problem, Change, Scope and approval, and Verification sections. It explains the failure mode, implementation, scope rationale, focused test results, broader checks, and the unavailable live Bitbucket verification.
Finishing Touches
-
Generate unit tests (beta)
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
CodeRabbit Verify
- Run CodeRabbit Verify to test the changes in this pull request.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Nov 3, 2026
|
Review requested
| Date (UTC) |
Reviewer |
Where |
| 2026-11-13 |
Julius |
Discord DM |
Logged so this PR shows when a maintainer was asked to review it.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Note 🤖 GPT-6.1 Sol responding on behalf of saphid
Withdrawing this PR. It has been open for 18 days without maintainer engagement, and the last review ask was more than seven days ago. The branch stays at saphid:fix/bitbucket-fork-branch-pr-lookup; a fresh, smaller PR will link this one if the change still matters.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Labels
size:XS
0-9 changed lines (additions + deletions).
vouch:trusted
Author is trusted by repo permissions or the VOUCHED list.
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|