diff --git a/.mergify.yml b/.mergify.yml index 2492d85b..e8787af4 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -4,23 +4,18 @@ queue_rules: merge_conditions: - check-success = quality - check-success = test - - "check-success = test-cross-platform (ubuntu-latest, Linux)" - - "check-success = test-cross-platform (ubuntu-22.04, Linux)" - - "check-success = test-cross-platform (macos-latest, macOS)" - - "check-success = test-cross-platform (windows-latest, Windows)" + - check-success = test-cross-platform (ubuntu-latest, Linux) + - check-success = test-cross-platform (ubuntu-22.04, Linux) + - check-success = test-cross-platform (macos-latest, macOS) + - check-success = test-cross-platform (windows-latest, Windows) - check-success = coverage - pull_request_rules: - # Tier 1: Trusted bot PRs -- auto-approve and queue immediately - name: Auto-approve and queue dependabot PRs conditions: - base = main - author = dependabot[bot] - -draft - label != do-not-merge - # release.yml is autogenerated by cargo-dist -- dependabot updates to - # pinned actions in it will break the release pipeline. Dependabot has no - # way to ignore specific workflow files, so we block it here instead. - -files~=\.github/workflows/release\.yml actions: review: @@ -28,7 +23,6 @@ pull_request_rules: message: Automatically approved by Mergify queue: name: default - - name: Auto-approve and queue dosu PRs conditions: - base = main @@ -41,45 +35,38 @@ pull_request_rules: message: Automatically approved by Mergify queue: name: default - - name: Auto-queue release-plz PRs conditions: - base = main - - "head ~= ^release-plz-" + - head ~= ^release-plz- - -draft - label != do-not-merge actions: queue: name: default - - # Tier 2: Maintainer PRs -- queue when maintainer self-labels 'lgtm' - # (no approval required; solves the sole-maintainer self-merge problem) - name: Queue maintainer PRs with lgtm label conditions: - base = main - - "author=@maintainers" + - author=@maintainers - -draft - label = lgtm - label != do-not-merge actions: queue: name: default - - # Tier 3: External contributor PRs -- require maintainer approval - name: Queue external PRs when approved by maintainer conditions: - base = main - - "-author=@maintainers" + - -author=@maintainers - author != dependabot[bot] - author != dosubot[bot] - - "-head ~= ^release-plz-" + - -head ~= ^release-plz- - -draft - - "approved-reviews-by=@maintainers" + - approved-reviews-by=@maintainers - label != do-not-merge actions: queue: name: default - - name: Keep PRs up to date with main conditions: - base = main @@ -89,33 +76,28 @@ pull_request_rules: - label != do-not-merge actions: update: {} - merge_protections: - name: Enforce conventional commit description: Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/ if: - base = main success_conditions: - - "title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert)(?:\\\\(.+\\\\))?!?:" - + - "title ~= + ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert)(?:\\\\(\ + .+\\\\))?!?:" - name: CI must pass - description: >- - All CI checks must pass. This protection prevents manual merges + description: All CI checks must pass. This protection prevents manual merges that bypass the merge queue. if: - base = main success_conditions: - check-success = quality - - check-success = test - - "check-success = test-cross-platform (ubuntu-latest, Linux)" - - "check-success = test-cross-platform (ubuntu-22.04, Linux)" - - "check-success = test-cross-platform (macos-latest, macOS)" - - "check-success = test-cross-platform (windows-latest, Windows)" - - check-success = coverage - + - check-success = test-cross-platform (ubuntu-latest, Linux) + - check-success = test-cross-platform (macos-latest, macOS) + - check-success = test-cross-platform (windows-latest, Windows) - name: Do not merge outdated PRs description: Make sure PRs are within 10 commits of the base branch before merging if: - base = main success_conditions: - - "#commits-behind <= 10" + - "#commits-behind <= 3"