Skip to content
Snippets Groups Projects
Commit 4415b0f5 authored by Éloïs's avatar Éloïs
Browse files

ci: MR with runtime changes should have a runtime-* milestone (!81)

* ci: MR with runtime changes should have a runtime-* milestone
parent 4e07e4ea
No related branches found
No related tags found
1 merge request!81ci: MR with runtime changes should have a runtime-* milestone
......@@ -34,7 +34,7 @@ check_labels:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- when: never
script:
- ./scripts/check_labels.sh $CI_MERGE_REQUEST_LABELS
- ./scripts/check_labels.sh $CI_MERGE_REQUEST_LABELS $CI_MERGE_REQUEST_MILESTONE
.env:
image: paritytech/ci-linux:production
......
......@@ -6,12 +6,24 @@ RN_LABELS=(
RN-silent
)
MR_LABELS=$1
MR_MILESTONE=$2
echo "Labels: $MR_LABELS"
echo "Milestone: $MR_MILESTONE"
if [[ "$MR_LABELS" == *"RN-runtime"* ]]; then
if [[ "$MR_MILESTONE" != "runtime-"* ]]; then
echo "MR with runtime changes should have a runtime-* milestone."
exit 1
fi
fi
for RN_LABEL in ${RN_LABELS[@]}; do
if [[ "$1" == *"$RN_LABEL"* ]]; then
echo "exit 0"
if [[ "$MR_LABELS" == *"$RN_LABEL"* ]]; then
exit 0
fi
done
echo "exit 1"
echo "Every MR should have at least one RN-* label."
exit 1
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