ci: Look for matching ref in user remote for branch pipeline
We currently only find a matching ref on the same remote in a merge request pipeline, but not in branch pipelines. It can occasionally be useful to run a pipeline without opening a merge request, so try the same remote here as well instead of just assuming origin. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2814>
This commit is contained in:
parent
1f08056977
commit
dbc9ebc6ab
@ -41,8 +41,9 @@ if [ "$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" ]; then
|
||||
fi
|
||||
|
||||
if [ -z "$mutter_target" ]; then
|
||||
ref_remote=${CI_PROJECT_URL//gnome-shell/mutter}
|
||||
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
|
||||
mutter_target=FETCH_HEAD
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user