mr create: not respecting Merge request branch workflow rules
Checklist
-
I'm using the latest version of the extension (Run
glab --version)- Extension version: Put your extension version here
- Operating system and version: Debian GNU/Linux
- Gitlab.com or self-managed instance? self-managed instance
- GitLab version (if self-managed) v18.9.2-ee
-
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
❯ DEBUG=true glab mr create
[git remote -v]
[git config --get-regexp ^remote\..*\.glab-resolved(-base|-head)?$]
[git remote -v]
[git config --get-regexp ^remote\..*\.glab-resolved(-base|-head)?$]
[git remote -v]
[git config --get-regexp ^remote\..*\.glab-resolved(-base|-head)?$]
[git symbolic-ref --quiet --short HEAD]
[git remote show origin]
[git rev-parse --show-toplevel]
[git -c log.ShowSignature=false log --pretty=format:%H,%s --cherry origin/main...where-does-this-go]
[git -c log.ShowSignature=false show -s --pretty=format:%b 6d81fdcdcfec6110379730610e5a7e350dcb8ea9]
[git -c log.ShowSignature=false show -s --pretty=format:%b 3b76f5da1bf08a828fd42a4a6a0eaca244a41a83]
Creating merge request for where-does-this-go into main in christoph.bluem/mr-tests
!5 testing glab (where-does-this-go)
https://<redacted>/christoph.bluem/mr-tests/-/merge_requests/5
Summary
Configuring the Merge request branch workflow for the repository has no effect on glab mr create.
Setting Branch name pattern: * to Target branch: development, new MRs when created in the WebUI are indeed defaulting to the development branch. Creating a MR with glab mr create does target the main/default branch of the repository.
Environment
- OS: Linux 6.1.0-44-amd64 x86_64
- SHELL: /bin/zsh
- TERM: xterm-256color
- GLAB: glab 1.89.0 (c6fca530)
Other: /
Steps to reproduce
- In the Repository Settings -> Merge requests -> Merge request branch workflow, set
Branch name pattern: *toTarget branch: development. - Create a new branch and create a MR from the CLI
glab mr create
What is the current bug behavior?
Currently all MRs created by glab mr create target the default branch of the repository.
What is the expected correct behavior?
glab mr create should respect the Merge request branch workflow rules set by the repository.