Skip to content

Commit

Permalink
Bug 1780740 - A-C bumps should auto-merge if CI is green on release b…
Browse files Browse the repository at this point in the history
…ranches (mozilla-mobile#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
  • Loading branch information
JohanLorenzo authored Jul 25, 2022
1 parent c2e749a commit f65a164
Showing 1 changed file with 32 additions and 17 deletions.
49 changes: 32 additions & 17 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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
Expand All @@ -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]
Expand Down

0 comments on commit f65a164

Please sign in to comment.