Skip to content

fix(bitbucket): recognize ssh.bitbucket.org remotes - #31002

Merged
nwparker merged 4 commits into
stablyai:mainfrom
Pr1p:codex/bitbucket-ssh-host-alias
Oct 24, 2026
Merged

nwparker merged 4 commits into
stablyai:mainfrom
Pr1p:codex/bitbucket-ssh-host-alias

Conversation

@Pr1p

@Pr1p Pr1p commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Recognizes the official ssh.bitbucket.org endpoint when resolving Bitbucket repositories and building hosted source links. Repositories using either [email protected]:team/repo.git or ssh://[email protected]/team/repo.git now select Bitbucket for pull request creation, and file/commit links use https://bitbucket.org.

Fixes #30783.

Validation:

  • Reproduced on fresh main using real disposable Git repositories, the production remote probes/provider selection, and file/commit link builders. Alias remotes selected Gitea and returned no hosted links before the fix.
  • Repeated the same flow after the fix for URL/SCP forms, case/port variants, canonical remotes and lookalike hosts. All ten cases passed; Git configuration remained unchanged.
  • 50 tests across six focused suites passed. New regression assertions fail against unmodified main.
  • Node typecheck, changed-code quality scans, formatting and diff checks passed.

Preserves Chen's original fix and commit history; adds coverage for case/port handling, canonical commit links and lookalike-host rejection.

@coderabbitai

coderabbitai Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Important

Review skipped

We couldn't safely recover the incremental review. No full review was started, and the last reviewed checkpoint was preserved. Retry later, or explicitly request a full review by commenting @coderabbitai full review.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review.

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 33be2064-327c-4f89-a421-b8a6733593b2
📥 Commits

Reviewing files that changed from the base of the PR and between 00d25d1 and edc5f47.

📒 Files selected for processing: 4
  • src/main/bitbucket/repository-ref.test.ts
  • src/main/bitbucket/repository-ref.ts
  • src/main/git/hosted-remote-url.test.ts
  • src/main/git/hosted-remote-url.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

Walkthrough

The changes accept Bitbucket remotes hosted at ssh.bitbucket.org in repository parsing and hosted URL generation. The parser continues to reject other URL hosts. Hosted URL generation identifies the SSH hostname as Bitbucket and uses bitbucket.org as the canonical host. Tests cover SCP-style and ssh:// remotes, plus a generated file URL.

Priority: Normal

Severity of issue fixed: Medium

Merge Risk: Minimal · up to edc5f

The Bitbucket SSH alias support is mergeable with the supplied validation.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 4 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly identifies the main change: recognizing ssh.bitbucket.org as a Bitbucket remote.
Description check Passed The description follows the required template and explains the user impact, implementation, rationale, linked issue, testing, AI disclosure, and compatibility considerations. It also documents that fu…
Linked Issues check Passed The changes satisfy issue #30783. providerForHost recognizes ssh.bitbucket.org and canonicalizes it to bitbucket.org. parseBitbucketRepoRef accepts the alias for URL remotes. Tests cover SCP-s…
Out of Scope Changes check Passed The changes stay within issue #30783. They update hosted-provider detection, Bitbucket repository parsing, and related automated tests. The changes add no separate provider behavior or UI changes.
Full details: Description check

Explanation

The description follows the required template and explains the user impact, implementation, rationale, linked issue, testing, AI disclosure, and compatibility considerations. It also documents that full validation is delegated to CI.

Full details: Linked Issues check

Explanation

The changes satisfy issue #30783. providerForHost recognizes ssh.bitbucket.org and canonicalizes it to bitbucket.org. parseBitbucketRepoRef accepts the alias for URL remotes. Tests cover SCP-style and ssh:// remotes and canonical Bitbucket links. The reported parser tests passed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

nwparker and others added 2 commits October 23, 2026 04:55
Apply Chen's original SSH alias fix to current main, preserving canonical
Bitbucket browser links and adding case/port and lookalike-host coverage.

Co-authored-by: Chen <[email protected]>
Retain Chen's exact original commit edc5f47
while preserving the independently reviewed and verified current-main tree.
# Conflicts:
#	src/main/git/hosted-remote-url.test.ts
@nwparker
nwparker merged commit 8604a4d into stablyai:main Oct 24, 2026
33 checks passed
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.

[Bug]: Bitbucket remotes on ssh.bitbucket.org aren't recognized

2 participants