Skip to content
Snippets Groups Projects
Commit 7dcc2d7c authored by Grégoire Kubler's avatar Grégoire Kubler
Browse files

fix : only retrieving opened merge request pipelines

parent 015159f9
No related branches found
No related tags found
No related merge requests found
......@@ -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\""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment