Delete source branch when commits reach default branch
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Problem to solve
When creating or editing a merge request that references an unprotected source branch, there's the merge option to "Delete source branch when merge request is accepted".
In scenarios where a feature branch is first merged with staging followed by staging being merged with master (see below), enabling this setting could potentially delete a feature branch before it's merged with master. For users that make use of a staging branch for manual verification and acceptance, this behavior is unacceptable.
First:
[feature branch] --MR to--> [staging (protected)] -->(merge) --> (final manual verification & acceptance)
Then later:
[staging (protected)] --MR to--> [master (protected)] -->(merge)
Proposal
A new merge option to "Delete source branch when commits reach default branch". Alternatively, the user could select a target branch that the commits must reach in order for the source branch to be deleted.