Files
pezkuwi-subxt/polkadot/scripts/gitlab/check_labels.sh
T
2020-06-16 15:38:43 +02:00

24 lines
562 B
Bash
Executable File

#!/usr/bin/env bash
#shellcheck source=lib.sh
source "$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )/lib.sh"
# Must have one of the following labels
labels=(
'B0-silent'
'B1-releasenotes'
'B2-runtimenoteworthy'
)
echo "[+] Checking labels for $CI_COMMIT_BRANCH"
for label in "${labels[@]}"; do
if has_label 'paritytech/polkadot' "$CI_COMMIT_BRANCH" "$label"; then
echo "[+] Label $label detected, test passed"
exit 0
fi
done
echo "[!] PR does not have one of the required labels! Please add one of: ${labels[*]}"
exit 1