Add mr create cli options to configuration

Problem to solve

Having to type in default things you always want:

  • target branch
  • Delete branch once merged
  • Create source branch

Put these in the configuration

# Set the target branch to your tracking branch
glab config set target-branch-tracking true

# Set your target branch to always 'somebranch'
glab config set target-branch somebranch

# delete branch after merge
glab config set remove-source-branch true

# Create source branch
glab config set create-source-branch true

These default are now applied to glab mr create and can be overridden via the CLI, e.g. glab mr create --target-branch main overrides the target-branch somebranch configuration. For remove source branch we would probably need to implement a --no-remove-source-branch flag to counter it, similar functionality is needed for create-source-branch.

If #7247 (closed) gets merged I would like to be able to add --fill and --fill-commit-id with in this configuration like so:

fill true
fill-commit-id HEAD

This would mean that my latest commit is used as the commit for the title and the description.

Further details

Links / references