Skip to content

Bitbucket PR Url is incorrect when there is a semver in the branch #8220

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

Closed
thattomperson opened this issue Apr 22, 2025 · 4 comments · Fixed by #8356
Closed

Bitbucket PR Url is incorrect when there is a semver in the branch #8220

thattomperson opened this issue Apr 22, 2025 · 4 comments · Fixed by #8356
Labels
bug Something isn't working UI Any broken visuals like layouts, colors etc.

Comments

@thattomperson
Copy link

thattomperson commented Apr 22, 2025

Version

0.14.18

Operating System

macOS

Distribution Method

dmg (Mac OS - Apple Silicon)

Describe the issue

I currently have my target set to a branch called preview/v1.1.0
When clicking on the Open In Browser button on a lane, it takes me to a page like
https://bitbucket.org/org/repo/branch/branch-1?dest=v1.1.0

the ?dest is missing the preview/ prefix

How to reproduce (Optional)

No response

Expected behavior (Optional)

No response

Relevant log output (Optional)

@thattomperson thattomperson added the bug Something isn't working label Apr 22, 2025
@Byron Byron added the UI Any broken visuals like layouts, colors etc. label Apr 22, 2025
@Byron
Copy link
Collaborator

Byron commented Apr 22, 2025

Thanks a lot for reporting!

The application seems to build the URL here:

this.url = `${baseUrl}/branch/${name}?dest=${baseBranch}`;

But it wasn't immediately clear how baseBranch is turned into something partial. Maybe this also needs URL-encoding so the /-character doesn't trip anything up.
In any case, I think @estib-vega will know what to do here.

@mrsimb
Copy link

mrsimb commented Apr 29, 2025

It does encode the parameter
https://bitbucket.org/mrsimb/test/branches/compare/preview%2Fv1.0.0%0Dmain

@Byron Would you mind if i take this issue?

@Byron
Copy link
Collaborator

Byron commented Apr 29, 2025

I think both @estib-vega and me will be looking forward to your PR :)!

@mrsimb
Copy link

mrsimb commented Apr 30, 2025

Nice!

mrsimb pushed a commit to mrsimb/gitbutler that referenced this issue Apr 30, 2025
krlvi added a commit that referenced this issue Apr 30, 2025
Encode BitBucket's branch url "dest" parameter (#8220)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working UI Any broken visuals like layouts, colors etc.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants