Skip to content
Snippets Groups Projects
Commit 7652670e authored by Julien Cristau's avatar Julien Cristau
Browse files

Bug 1810150 - stop scheduling pull-request task graphs when there's already a...

Bug 1810150 - stop scheduling pull-request task graphs when there's already a corresponding push graph

When a PR is opened from a branch in the main repo, we used to create a
task graph for both the push event and the pull-request open or
synchronize event, associated with the same commit, and thus essentially
doing the same work twice.

With this change, we skip the pull-request graph, and rely on the push
graph to run the required checks.  This requires corresponding changes
to the mergify config to consider either of complete-pr or complete-push
as good enough to merge a PR.
parent 8edbe35a
No related branches found
No related tags found
No related merge requests found
queue_rules:
- name: default
conditions:
- status-success=complete-pr
- or:
- status-success=complete-pr
- status-success=complete-push
pull_request_rules:
- name: Resolve conflict
conditions:
......@@ -12,7 +14,7 @@ pull_request_rules:
- name: MickeyMoz - Auto Merge
conditions:
- author=MickeyMoz
- status-success=complete-pr
- status-success=complete-push
- files~=^android-components/(Gecko\.kt|components/lib/publicsuffixlist/src/main/assets/publicsuffixes)
- -files~=^(?!android-components/(Gecko\.kt|components/lib/publicsuffixlist/src/main/assets/publicsuffixes)).+$
actions:
......@@ -25,7 +27,7 @@ pull_request_rules:
- name: L10N - Auto Merge
conditions:
- author~=(mozilla-l10n-automation-bot|github-actions\[bot\])
- status-success=complete-pr
- status-success=complete-push
- files~=^(android-components|focus-android)/(.+/strings\.xml|l10n\.toml)
- -files~=^(?!(android-components|focus-android)/(.+/strings\.xml|l10n\.toml)).+$
actions:
......@@ -38,7 +40,7 @@ pull_request_rules:
- name: Release automation
conditions:
- author=github-actions[bot]
- status-success=complete-pr
- status-success=complete-push
- files~=^android-components/(\.buildconfig\.yml|.+/NimbusGradlePlugin\.groovy|plugins/dependencies/src/main/java/(Gecko|DependenciesPlugin)\.kt|buildSrc/src/main/java/Gecko\.kt)
- -files~=^(?!android-components/(\.buildconfig\.yml|.+/NimbusGradlePlugin\.groovy|plugins/dependencies/src/main/java/(Gecko|DependenciesPlugin)\.kt|buildSrc/src/main/java/Gecko\.kt)).+$
actions:
......@@ -52,7 +54,9 @@ pull_request_rules:
force: false
- name: Needs landing - Rebase
conditions:
- status-success=complete-pr
- or:
- status-success=complete-pr
- status-success=complete-push
- label=🛬 needs landing
- "#approved-reviews-by>=1"
- -draft
......@@ -64,7 +68,9 @@ pull_request_rules:
name: default
- name: Needs landing - Squash
conditions:
- status-success=complete-pr
- or:
- status-success=complete-pr
- status-success=complete-push
- label=🛬 needs landing (squash)
- "#approved-reviews-by>=1"
- -draft
......
......@@ -146,8 +146,8 @@ tasks:
in:
$if: >
tasks_for in ["action", "cron"]
|| (isPullRequest && pullRequestAction in ["opened", "reopened", "synchronize"])
|| (tasks_for == "github-push" && head_ref[:10] != "refs/tags/" && short_head_ref != "staging.tmp" && short_head_ref != "trying.tmp" && short_head_ref[:8] != "mergify/")
|| (isPullRequest && pullRequestAction in ["opened", "reopened", "synchronize"] && baseRepoUrl != repoUrl)
|| (tasks_for == "github-push" && head_ref[:10] != "refs/tags/" && short_head_ref != "staging.tmp" && short_head_ref != "trying.tmp")
then:
$mergeDeep:
- $if: 'tasks_for != "action"'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment