mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2025-12-14 13:54:37 +03:00
Splitting out moderator check from syntax check
- Attempt to clarify CI runs from contributors
This commit is contained in:
@@ -11,5 +11,8 @@ issue=$(echo ${CI_BUILD_REF_NAME} | perl -ne '/^pr-(\d+)-\S+$/ && print $1')
|
||||
user=$(curl ${CURL_ARGS} "https://api.github.com/repos/kubernetes-incubator/kargo/issues/${issue}/comments" \
|
||||
| jq -M "map(select(.body | contains (\"$MAGIC\"))) | .[0] .user.login" | tr -d '"')
|
||||
# Check for the required user group membership to allow (exit 0) or decline (exit >0) the pipeline
|
||||
[ "$user" != "null" ] || exit 1
|
||||
if [ "$user" = "null" ]; then
|
||||
echo "User does not have permissions to start CI run"
|
||||
exit 1
|
||||
fi
|
||||
curl ${CURL_ARGS} "https://api.github.com/orgs/kubernetes-incubator/members/${user}"
|
||||
|
||||
Reference in New Issue
Block a user