mr create: not respecting Merge request branch workflow rules
<!--- 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 <!-- Please test the latest versions, that will remove the possibility that you see a bug that is fixed in a newer version. --> - [x] I'm using the latest version of the extension (Run `glab --version`) - Extension version: _Put your extension version here_ - [x] Operating system and version: _Debian GNU/Linux_ - [x] Gitlab.com or self-managed instance? _self-managed instance_ - [x] GitLab version (if self-managed) _v18.9.2-ee_ - [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 ``` ❯ 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 <!-- Summarize the bug encountered concisely --> 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 <!-- on POSIX system (Linux, MacOS), run bash -c 'printf -- "- OS: %s\n- SHELL: %s\n- TERM: %s\n- GLAB: %s" "$(uname -srm)" "$SHELL" "$TERM" "$(glab --version)"' and replace the following section with the result. If you use non-POSIX system, fill in the section manually: - OS: Your operating system including version and architecture (Windows 11 - AMD64, MacOS Sonoma - ARM64) - SHELL: Your shell (bash, fish, zsh, ...) - TERM: Your terminal emulator (Kitty, Xterm2..) - GLAB: result of running `glab --version` (glab version 1.32.0 (2023-08-18)) --> - OS: Linux 6.1.0-44-amd64 x86_64 - SHELL: /bin/zsh - TERM: xterm-256color - GLAB: glab 1.89.0 (c6fca530) <!-- Please include any other information that you believe might be relevant in debugging. For example, you may include a shell framework like oh-my-zsh or other customizations like editing the prompt (PS1, PS2, and others). --> Other: / ### Steps to reproduce <!-- How one can reproduce the issue - this is very important --> 1. In the Repository Settings -> Merge requests -> Merge request branch workflow, set `Branch name pattern: *` to `Target branch: development`. 2. Create a new branch and create a MR from the CLI `glab mr create` ### What is the current _bug_ behavior? <!-- What actually happens --> Currently all MRs created by `glab mr create` target the default branch of the repository. ### What is the expected _correct_ behavior? <!-- What you should see instead --> `glab mr create` should respect the Merge request branch workflow rules set by the repository. ### Relevant logs and/or screenshots <!--- Paste the activity log from your command line --> ### Possible fixes <!-- If you can, link to the line of code that might be responsible for the problem -->
issue