Fix: support Bitbucket Server URL redirects (alias hostnames) - #1935
Open
Laithalrubaie wants to merge 1 commit into
Open
Fix: support Bitbucket Server URL redirects (alias hostnames)#1935Laithalrubaie wants to merge 1 commit into
Laithalrubaie wants to merge 1 commit into
Conversation
Laithalrubaie
requested review from
Blastoplex,
amarg-at,
bwieger-atlassian-com,
cabella-dot,
ccallcottstevens,
cindy-atl,
dchiew-atl,
jwang19-atlassian,
leandrowd,
marcomura,
matt-lassian,
sdzh-atlassian and
teg-atlassian
as code owners
August 25, 2026 08:19
|
Hooray! All contributors have signed the CLA. |
Laithalrubaie
force-pushed
the
fix/bitbucket-server-url-redirect
branch
2 times, most recently
from
August 25, 2026 08:28
f504d70 to
107a87d
Compare
If a repo's remote uses an old/alias hostname that the webserver 301/302-redirects to the real Bitbucket Server host, the extension couldn't match it to a configured site (only exact/domain/mirror hostname matches were tried), so PR features silently didn't work. Probe unmatched remote hostnames for a redirect, cache the resolved real host, and let getSiteForHostname fall back to it.
Laithalrubaie
force-pushed
the
fix/bitbucket-server-url-redirect
branch
from
August 25, 2026 08:38
107a87d to
50a2bdb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Fixes an issue (closes #56 - #802 where git remotes using aliased hostnames that return 301/302 HTTP redirects fail to match configured Bitbucket Server sites, preventing features like the PR panel from loading.
Changes
redirectResolver.ts: Added utility to probe unmapped hostnames (HTTPS/HTTP without following redirects) and read theLocationheader from 3xx responses.BitbucketContext: Integrated the probe during repository refresh for unknown hostnames and added a 1-hour cache foralias → resolved host.siteManager: UpdatedgetSiteForHostnameto check the resolved redirect cache as a final fallback.Testing
redirectResolver,BitbucketContext, andsiteManagercaching/fallback logic.tsc --noEmitandeslintpass cleanly.Key Cuts & Improvements
axiosbehavior.Rovo Dev code review: Rovo Dev couldn't review this pull request
The pull request author does not have access to Rovo Dev.