Per batch change control for pushing to forks
Created by: malomarrec
Context
We have recently introduced the possibility to push branches created by Batch Changes to a fork of the repository, rather than the repository itself.
This was built as an MVP to address:
- Most users do not have write permission on all repositories, so branch creation fails for them (https://github.com/sourcegraph/accounts/issues/544)
- Some companies enforce that all PRs created by automation are opened on forks. (https://github.com/sourcegraph/accounts/issues/565, https://github.com/sourcegraph/accounts/issues/4778 )
Problem
The current MVP state is the end state solution for companies that mandate using forks for all repositories. It's not a fully mature solution though for users that don't have write-permission on all repositories and only want to use forks in some cases. In particular:
- not all users want to use forks
- a given user wants to use forks, but only for a specific batch change
- a user wants to create forks, only if they're missing permissions
Impacted customers
Next iteration
Make using forks a parameter of the batch change itself.
There could be a useForks:true
(default: false
) in the batch spec