From 7dcc2d7c334626fbdddadde76831f7c1109172ae Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gr=C3=A9goire?= <gregoire.kubler@proton.me>
Date: Wed, 24 Jul 2024 13:27:38 +0200
Subject: [PATCH] fix : only retrieving opened merge request pipelines

---
 .gitlab/ci/download/select_jobs.gitlab-ci.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.gitlab/ci/download/select_jobs.gitlab-ci.yml b/.gitlab/ci/download/select_jobs.gitlab-ci.yml
index 503c21a..ee1ca18 100644
--- a/.gitlab/ci/download/select_jobs.gitlab-ci.yml
+++ b/.gitlab/ci/download/select_jobs.gitlab-ci.yml
@@ -97,7 +97,7 @@
       	PIPELINES=$(curl -s "$API_URL/projects/$DEP_ID/pipelines?ref=${BRANCH_TO_PULL}")
       	echo "Found $(jq length <<<$PIPELINES) regular pipelines."
 
-      	echo "Retrieve first affiliated MR by curling \"$API_URL/projects/$DEP_ID/merge_requests?source_branch=$BRANCH_TO_PULL\""
+      	echo "Retrieve first affiliated MR by curling \"$API_URL/projects/$DEP_ID/merge_requests?source_branch=$BRANCH_TO_PULL&state=opened\""
       	MR_ID=$(curl -s "$API_URL/projects/$DEP_ID/merge_requests?source_branch=$BRANCH_TO_PULL" | jq '.[0].iid')
       	if [[ $MR_ID != null ]]; then
       		echo "MR pipeline curled from \"$API_URL/projects/$DEP_ID/merge_requests/$MR_ID/pipelines\""
-- 
GitLab