Skip to main content

Advanced Merge Workflows

Advanced Merge Workflows

Overview

Enhanced merge train analytics, stacked diffs, and cherry-pick automation for GitLab.

Components

1. Merge Train Analytics

File: workflow/merge-train/analytics.yml

  • Throughput tracking (MRs/hour)
  • Wait time measurement
  • Stall detection with webhook alerting

2. Stacked Diffs

File: workflow/stacked-diffs/template.yml

  • Automatic stack detection
  • Mermaid dependency graph generation
  • Stack health monitoring

File: workflow/stacked-diffs/auto-rebase.yml

  • Auto-rebase when base MR merges
  • Multiple strategies: update_target, rebase, merge
  • Conflict handling options

3. MR Dependency Chains

File: workflow/advanced-merge/dependency-chains.yml

  • Parse depends-on: !123 syntax
  • Block merge until dependencies are merged
  • Circular dependency detection

4. Cherry-Pick Automation

File: automation/cherry-pick/component.yml

  • Label-triggered cherry-picking
  • Multi-branch support with glob patterns
  • Conflict handling: fail, manual, skip

File: automation/cherry-pick/backport.yml

  • Automatic backport to release branches
  • Semver version filtering

5. Version-Aware Merging

File: workflow/advanced-merge/version-aware.yml

  • Extract version from spec:component
  • Auto-increment based on commit types
  • CHANGELOG.md updates
  • Git tag creation

Usage

include: - component: gitlab.com/blueflyio/agent-platform/gitlab_components/workflow/merge-train/analytics@main - component: gitlab.com/blueflyio/agent-platform/gitlab_components/workflow/stacked-diffs/template@main - component: gitlab.com/blueflyio/agent-platform/gitlab_components/automation/cherry-pick/component@main inputs: target_branches: "release/*,hotfix/*" cherry_pick_label: "cherry-pick"