-
Notifications
You must be signed in to change notification settings - Fork 6.5k
git: Fix support for self-hosted Bitbucket #42002
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
git: Fix support for self-hosted Bitbucket #42002
Conversation
6f9f0a7 to
549d624
Compare
|
Thank you for a quick reply! I have: where After running "get permalink" I get: But when visiting the desired file in web interface I have this URL: |
|
@lesha-co Got it. I can change the URL logic, but I'm not sure if self-hosted Bitbucket requires a special URL or if the original code was just wrong. I'd like to confirm this, but I'm still blocked from creating a workspace on bitbucket.org. :( If you don't mind, could you register a Bitbucket.org account and confirm the correct URL structure? |
|
Sure! I've done it and BitBucket Cloud gave me the link that conforms to the pattern Zed uses. What I've found: Atlassian Community forums mention that BitBucket Server indeed uses different pattern see this post There is an issue though, they have different paths for repos under "projects" and under users. I'm not sure how to solve it solely relying on git remote URL: |
|
Here's relevant part of GitLens extension in VSCode: They seem to ignore the /users/, can't find it anywhere so I guess we can go ahead and ignore it too |
|
Okay, I've adapted the logic to support the commit permalink, path permalink, and pull request link for self-hosted Bitbucket instances. Additionally, it appears the line-number format for bitbucket.org was also incorrect. Following the official Atlassian documentation, the correct format for specifying line ranges is |
|
No, it's another difference between Cloud and Server |
|
Update: I tried 451110f and it works for me. Great, thanks! just remember that |
|
Ah, it seems their official documentation might be a bit out of date. The page at https://support.atlassian.com/bitbucket-cloud/docs/hyperlink-to-source-code-in-bitbucket/ only explicitly mentions the |
|
So, to confirm the current state: Bitbucket Cloud uses |
|
Yes, that is correct :) |
|
Thanks! |
Closes zed-industries#41995 Release Notes: - Fixed support for self-hosted Bitbucket
Closes #41995
Release Notes: