Skip to content

fix(bitbucket): honor repository in pull request URLs - #23442

Closed
yashranaway wants to merge 1 commit into
pingdotgg:mainfrom
yashranaway:fix/bitbucket-pr-url-repository
Closed

yashranaway wants to merge 1 commit into
pingdotgg:mainfrom
yashranaway:fix/bitbucket-pr-url-repository

Conversation

@yashranaway

Copy link
Copy Markdown
Contributor

Opening a Bitbucket PR URL from another repository uses the checkout's repository instead, which can select the wrong PR with the same number. Honor the repository in the URL and only reuse a checkout remote when it matches the PR source.

Regressions fail before the fix for lookup and checkout, with and without an explicit remote context. All 24 API tests pass, including number-only and fork checkout behavior. Targeted lint, package typecheck, and server typecheck pass. API responses and Git operations were tested through fixtures.

@coderabbitai

coderabbitai Bot commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Only developers with an assigned seat can use this organization's usage-based review budget, and seats here are assigned manually. Ask an admin to assign a seat, or change the review continuation mode in Billing.

Next included review available in 39 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
📥 Commits

Reviewing files that changed from the base of the PR and between 3b95e78 and 0742d1e.

📒 Files selected for processing: 2
  • apps/server/src/sourceControl/BitbucketApi.test.ts
  • packages/source-control-bitbucket/src/server/BitbucketApi.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Oct 22, 2026
@macroscopeapp

macroscopeapp Bot commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 0742d1e

Macroscope's review found this PR approvable — This is a narrowly scoped Bitbucket bug fix that honors the repository encoded in pull-request URLs and prevents mismatched checkout remotes from being reused. Regression tests cover URL lookup, fork checkout, context handling, and the existing number-only path.

You can add or adjust custom eligibility rules. Learn more.

Copy link
Copy Markdown
Member

Closing in favour of #25052, which makes the same change. Thanks for the work here!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants