Skip to content

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)
  • Operating system and version: Void Linux x86_64

  • Gitlab.com or self-managed instance? gitlab.com

  • I have performed glab auth status to 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

  1. Create two branches, e.g. main and dev
  2. Set up a pipeline to run on push to both branches
  3. Push the same commit to both branches, with small interval between pushes
  4. Switch to main and run glab ci view
  5. Switch to dev and run glab 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

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information