1
0
Fork 0

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: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3153>
This commit is contained in:
Carlos Garnacho 2023-08-04 19:04:24 +02:00
parent 46cb355799
commit c45a64be7a

View file

@ -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