From c45a64be7a21ef39a9d13fc5495cf1890bb6a921 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Fri, 4 Aug 2023 19:04:24 +0200 Subject: [PATCH] ci: Look for matching ref in user remote for branch pipeline Same reasoning than gnome-shell@dbc9ebc6abc8 applies, it may be useful to run a pipeline with matching branches in the other project, without necessarily opening a merge request. Part-of: --- .gitlab-ci/checkout-gnome-shell.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci/checkout-gnome-shell.sh b/.gitlab-ci/checkout-gnome-shell.sh index 4e086da48..f8e3ecdcf 100755 --- a/.gitlab-ci/checkout-gnome-shell.sh +++ b/.gitlab-ci/checkout-gnome-shell.sh @@ -41,8 +41,9 @@ if [ "$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" ]; then fi if [ -z "$gnome_shell_target" ]; then + ref_remote=${CI_PROJECT_URL//mutter/gnome-shell} echo -n Looking for $CI_COMMIT_REF_NAME on remote ... - if fetch origin $CI_COMMIT_REF_NAME; then + if fetch $ref_remote $CI_COMMIT_REF_NAME; then echo \ found gnome_shell_target=FETCH_HEAD else