-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Apply encodeURIComponent() to pieces of the custom remote URL #2336
Comments
What are you seeing when you open a branch on this remote? I've tried the provided setup with branches with |
The slash shows up in the URL but the server expect it to be URL encoded if it's the branch name. That is if the branch name is |
Oh, hrm. What type of Git server is it? |
It's hosted using Phabricator |
This issue needs more information and has not had recent activity. Please provide the missing information or it will be closed in 7 days. Thanks! |
Closing this issue because it needs more information and has not had recent activity. Please re-open this issue if more details can be provided. Thanks! |
what other information is needed? |
Sorry I was travelling and the bot got to it before I labelled it appropriately. |
I don't know if there is a good way to implement this, without adding support for Phabricator itself, as I'm guessing the type of url encoding would be very specific based on the url itself. I also haven't heard this request before -- so I'm unsure if this is a Phabricator "thing" or the way you are hosting it? |
I see. I am not sure if it's Phabricator specific but fwiw this is an example URL pattern that works without so IIUC if there's a slash in |
This would be a great (and fairly easy-to-do) addition! The change would have to occur in https://github.com/gitkraken/vscode-gitlens/blob/fe5d12f93f825d4e8d5228bfd8fe449600877492/src/git/remotes/custom.ts |
The main issue here is that some providers need certain encoding and others done. To handle this, I've added alternate versions of all the tokens with a NOTE, if you use any Can you please verify this fix in You can switch to the pre-release edition of GitLens, by clicking on the "Switch to Pre-Release version of this extension" from the Extensions view. |
Thanks for the fast response! It doesn't appear to have made any difference. I switched to the prerelease version and verified that I was on |
Hrm, are you using the commands to open or copy the url? |
I'm using the command palette, so |
Gotcha, I'll have to look into that. Do the copy commands work for you? |
That's odd, yes they do. |
It appears that only the actual |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Description
We have set a custom remote by specifying the following dictionary in the
.vscode/settings.json
fileHowever the branch name
${branch}
can itself have the/
in it and this would make the URL invalid. What is the best way to applyencodeURIComponent()
to the branch name? That is:https://foo.com/${repo}/browse/encodeURIComponent(${branch})/
GitLens Version
13.0.4
VS Code Version
Version: 1.73.1 (Universal)
Commit: 6261075646f055b99068d3688932416f2346dd3b
Date: 2022-11-09T02:08:38.961Z (22 hrs ago)
Electron: 19.0.17
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Darwin arm64 21.6.0
Git Version
git version 2.37.0 (Apple Git-136)
Logs, Screenshots, Screen Captures, etc
No response
The text was updated successfully, but these errors were encountered: