Skip to content

Automated Merge Pipeline

Sino Kholkhojaev edited this page Mar 24, 2026 · 1 revision

Overview

Milo uses a fully automated stage-then-main merge pipeline. No manual merges to stage or main should happen outside of emergencies.

Merge-to-Stage

Trigger:

Cron (every 4 hours), manual dispatch, or repository dispatch (anyone with write access may trigger the repo dispatch for the workflow at any point. if there is no harm and the conditions are met PRs can be merged earlier.)

What it does:

  1. Collects all PRs targeting stage with the Ready for Stage label
  2. Skips PRs with failing or in-progress checks
  3. Categorizes PRs: zero-impacthigh-prioritynormal
  4. Squash-merges up to 9 PRs per batch (zero-impact PRs don't count toward this limit)
  5. During pre/post RCP windows (7-day buffer), batch limit increases to 12
  6. Creates a [Release] Stage to Main PR linking all merged PRs
  7. Tags SOT teams for testing
  8. Sends Slack notification
  • Pauses during: Active RCP windows and stage freezes

merge-to-main

Trigger:

Daily at 9:00 UTC or on label events

What it does:

  1. Checks for the Stage-to-Main release PR
  2. Requires 4+ SOT sign-off labels on the PR
  3. Only runs Mon–Thu, 08:00–20:00 UTC (no Fridays, weekends, or holidays)
  4. Merges using merge commit (not squash) to preserve stage history
  5. After merge, dispatches merge-to-stage to restart the cycle
  6. Clears Akamai CDN cache
  7. Creates/closes a ServiceNow Change Management Record (CMR)
  • Pauses during: Active RCP windows
  • Who can trigger this action: anybody, if the PR has 4 sign offs

_Note: we specifically do not clear cache for stage, since theres no helix push invalidation _

Manual Merge Detection

If someone manually merges a PR to stage or main (bypassing automation), the pr-manual-merge workflow:

  • Sends a Slack notification alerting the team
  • Updates the Stage-to-Main PR body to include the manually merged PR

This ensures visibility even when the normal process is bypassed.

Clone this wiki locally