gitlab-ci: Fix "triggered by Marge for a merge request" rule

The commit below changed the rule such that it accidentally also applied
to the non-MR pipelines created by Marge, resulting in Marge triggering
twice as many jobs as necessary.

Fixes: 549b4a3dd4 "gitlab-ci: Automatically run pipelines for Marge
                     Bot pre-merge only"

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5898>
This commit is contained in:
Michel Dänzer 2020-07-14 11:12:19 +02:00 committed by Marge Bot
parent 559b26b7ee
commit cbdb87c678

View file

@ -173,7 +173,7 @@ success:
when: on_success
# Run pipeline by default if it was triggered by Marge Bot, is for a
# merge request, and any files affecting the pipeline were changed
- if: '$GITLAB_USER_LOGIN == "marge-bot" && $CI_PROJECT_PATH != "mesa/mesa"'
- if: '$GITLAB_USER_LOGIN == "marge-bot" && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME == $CI_COMMIT_REF_NAME'
changes:
*all_paths
when: on_success