glab ci view - wrong branch
Checklist
-
I'm using the latest version of the extension (Run glab --version)- Extension version:
glab 1.68.0 (1ab9db22)
- Extension version:
-
Operating system and version: Void Linux x86_64 -
Gitlab.com or self-managed instance? gitlab.com -
I have performed glab auth statusto check for authentication issues -
Run the command in debug mode (like DEBUG=true glab mr list) and attach any useful output[git remote -v] [git config --get-regexp ^remote\..*\.glab-resolved$]
Summary
glab ci view does not display the current branch pipeline. glab ci view --branch=main does not display the pipeline for the requested branch. It appears that both always display the latest pipeline from the repository. Same bug #7465 (closed) has been fixed for glab ci status.
Environment
- OS: Void Linux (Linux 6.14.11_1) x86_64
- SHELL: zsh
- TERM: kitty
- GLAB:
glab 1.68.0 (1ab9db22)
Steps to reproduce
- Create two branches, e.g.
mainanddev - Set up a pipeline to run on push to both branches
- Push the same commit to both branches, with small interval between pushes
- Switch to
mainand runglab ci view - Switch to
devand runglab ci view
What is the current bug behavior?
You will notice both commands from steps 5 & 6 giving the same result: the newest pipeline for this commit, e.g. dev in both cases. Same problem if you provide -b option: it seems to be just ignored.
What is the expected correct behavior?
glab ci view uses correct branch, like glab ci status after the fix
Possible fixes
Not familiar with the codebase of glab. Created this issue at the request of @abitrolly