From f65a16456d965d12eff5364193b07c3dfcd06823 Mon Sep 17 00:00:00 2001 From: Johan Lorenzo Date: Mon, 25 Jul 2022 14:12:04 +0200 Subject: [PATCH] Bug 1780740 - A-C bumps should auto-merge if CI is green on release branches (#7409) * Bug 1780740 - part 1: Move A-C bump automerge rule closer to the l10n one * Bug 1780740 - part 2: Don't automatically approve a bump if any other files than AndroidComponents.kt are changed * Bug 1780740 - part 3: Auto-merge A-C updates on both main and release branches * Bug 1780740 - part 4: Fix typo on comment about TC and PR events --- .mergify.yml | 49 ++++++++++++++++++++++++++++++++----------------- 1 file changed, 32 insertions(+), 17 deletions(-) diff --git a/.mergify.yml b/.mergify.yml index 6e9439f4e39..ba5345beb8a 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -4,10 +4,16 @@ queue_rules: - or: - status-success=complete-pr - and: - # For more context, see "L10N - Auto Merge" rule down below - - base~=^releases[_/].* - - head~=^automation/sync-strings-\d+ + # For more context, see "Auto Merge" rules down below - status-success=complete-push + - or: + - and: + - base~=^releases[_/].* + - head~=^(relbot/focus|automation/sync-strings)-\d+ + - and: + - base=main + - head~=relbot/AC-Nightly-.+ + pull_request_rules: - name: L10N - Auto Merge conditions: @@ -29,7 +35,7 @@ pull_request_rules: - head~=^automation/sync-strings-\d+ - status-success=complete-push # Taskcluster only runs on git-push events because github-actions[bot] is not considered - # a collaborator, so pull request events are triggered. That said, github-actions[bot] + # a collaborator, so pull request events not are triggered. That said, github-actions[bot] # doesn't create the PR on a separate fork (unlike mozilla-l10n-automation-bot). That's # why git-push events are taken into account actions: @@ -40,6 +46,28 @@ pull_request_rules: method: rebase name: default rebase_fallback: none + - name: Android-Components bump - Auto Merge + conditions: + - and: + - files=buildSrc/src/main/java/AndroidComponents.kt + - -files~=^(?!buildSrc/src/main/java/AndroidComponents.kt).+$ + - author=github-actions[bot] + - status-success=complete-push + - or: + - and: + - base=main + - head~=relbot/AC-Nightly-.+ + - and: + - base~=^releases[_/].* + - head~=^relbot/focus-\d+ + actions: + review: + type: APPROVE + message: 🚢 + queue: + method: rebase + name: default + rebase_fallback: none - name: Needs landing - Rebase conditions: - base=main @@ -62,19 +90,6 @@ pull_request_rules: method: squash name: default rebase_fallback: none - - name: Relbot - Auto Merge - conditions: - - base=main - - files~=AndroidComponents.kt - - author=github-actions[bot] - actions: - review: - type: APPROVE - message: ✅ Cleared to land. - queue: - method: rebase - name: default - rebase_fallback: none - name: Relbot - delete head branch after merge conditions: - author=github-actions[bot]