Auto-merge changesets
View options
- Truncate descriptions
Created by: malomarrec
Problem to solve
In some cases, such as simple configuration changes, users create batch changes with lots of small changesets that they expect to merge themselves after checks and/or review passes. Instead of regularly checking batch changes for changesets that are ready to merge, changesets could be merged automatically once conditions are met.
See product gap
Solution summary
Allow a batch change to opt into auto-merging changesets on conditions:
- When the CI tests pass
- When all assigned reviewers are satisfied
- When the change can merge cleanly
- Any or all of the above
MVP
- We can scope this down to allowing auto-merge if
review
andcheck
pass (per our current definition). - If merge cannot be done cleanly, add a comment in the issue "Batch Changes attempted to merge but xxx" and report that somewhere (maybe in the bulk action or logs tab).
- It can be set with a CLI flag (
src batch remote --automerge
andsrc batch apply --automerge
) and UI checkbox that allow, atapply
to enable auto-merge (this is aneeds-design
, maybe a spec param is better). In later versions "enable auto-merge" could be a bulk action. - We need a way to signify to users that auto-merge is on on a batch change, and to disable it
We'll need pings, so this needs-RFC
. The right metric is probably # batch changes with automerge created
Customers we're iterating with
- dogfood
- https://github.com/sourcegraph/accounts/issues/6859
- https://github.com/sourcegraph/accounts/issues/8360
Success criteria
- 20% of customers use auto-merge in the first 3 months
Delivery plan
TBD