glab api using :branch does not urlencode
<!--- Please read this! Before opening a new issue, make sure to search for keywords in the issues filtered by the "bug" label: - https://gitlab.com/gitlab-org/cli/-/issues/?label_name%5B%5D=type%3A%3Abug and verify the issue you're about to submit isn't a duplicate. ---> ### Checklist - [x] I'm using the latest version of the extension (Run `glab --version`) - Extension version: _\`_glab 1.101.0 (b3786045)_\`_ - [x] Operating system and version: _debian 13_ - [x] Gitlab.com or self-managed instance? _gitlab.com_ - [ ] GitLab version (if self-managed) _GitLab version here_ (Use the `version` endpoint, like this: gitlab.my-company.com/api/v4/version) - [x] I have performed `glab auth status` to check for authentication issues - [x] Run the command in debug mode (like `DEBUG=true glab mr list`) and attach any useful output ### Summary When a branch has a `/` in it, glab api does not urlenocde it properly ### Environment - OS: Linux 6.12.73+deb13-amd64 x86_64 - SHELL: /bin/bash - TERM: tmux-256color - GLAB: glab 1.101.0 (b3786045) ### Steps to reproduce 1. create a branch named `test/whatever` 2. setup branch protection (this is just teh api I was using) 3. `glab api /projects/:id/protected_branches/:branch` -\> get 404 4. `glab api /projects/:id/protected_branches/test%2Fwhatever` -\> get data ### What is the current _bug_ behavior? 404 ### What is the expected _correct_ behavior? not 404 ### Relevant logs and/or screenshots ``` $ DEBUG=true glab api /projects/:id/protected_branches/:branch [git remote -v] [git config --get-regexp ^remote\..*\.glab-resolved(-base|-head)?$] [git symbolic-ref --quiet --short HEAD] { "error": "404 Not Found" } glab: HTTP 404 ``` ### Possible fixes url encode `:branch`
issue