Skip to content

Auto-merge changesets

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 and check 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 and src batch apply --automerge) and UI checkbox that allow, at apply to enable auto-merge (this is a needs-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

Success criteria

  • 20% of customers use auto-merge in the first 3 months

Delivery plan

TBD