Skip to content

Automatically submit MR via fork

Summary

glab mr create should automatically submit an MR by pushing a branch to my fork, rather than attempting to push to the upstream repository and getting a 403.

Steps to reproduce

glab repo clone a repository that you don't have push access to.

Create a branch, make a change, and commit the change to that branch.

glab mr create

Get a 403 Forbidden, as glab attempts to push to the upstream repository.

I would expect this to, instead, create a fork if I don't already have one, push the branch to that fork, and create an MR from there.

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