Missing URL-encoding for branches.
By kaHaleMaKai,
Description
When on a branch that includes character that require url-encoding, they don't get encoded when opening the repo in a browser.
Expected Behavior vs Actual Behavior
E.g. on a branch like #1-this-is-my-first-issue the opened url should be something like
https://GITLAB_URL/NS/PROJECT/-/tree/%231-my-first-issue
Instead, the browser opens the un-encoded url
https://GITLAB_URL/NS/PROJECT/-/tree/#1-my-first-issue
and fails.
Possible Fix Url-encode the branch name. I haven't checked whether this also applies to issue names, mrs etc.
Steps to Reproduce
-
cdinto a git repo. - Create a branch that includes a character that needs url-encoding such as
#. - Run
glab repo view --web. - See error
Logs
no logs
Your Environment
- Version used (Run
glab --version):1.21.1 (2021-09-28) - Operating System and version:
debian testing/bookworm
Last updated: 2022-01-31T20:01:20.065Z
https://gitlab.com/profclems/glab/-/issues/279
This issue has been automatically marked as stale because it has not had recent activity. We haven't had the time to address it yet, but we want to keep it open. This message is just a reminder for us to help triage issues.