cli: mr create takes the checked-out branch as --source !206

merged merged by cmc on 2026-09-04 00:38 UTC · krz/gitbay:mr-create-source into main

Discussion

cmc

Inside a clone, gitbay mr create --title x failed with usage until --source was typed. When the repository was inferred from the clone and no --source is given, the CLI now adds the checked-out branch (git symbolic-ref --short HEAD; a detached HEAD adds nothing). Naming another repository explicitly leaves --source to the caller, since meaning this checkout's branch for another repository is unlikely. --target already defaulted to the repository's default branch on the server.

TestCLI now creates its merge request with only --title and checks the recorded source and target.

Stacked on !205; no code dependency.

Closes #101

retargeted from web-error-codes to main: !205 merged

2026-09-04 00:38 UTC