pr_check: remove label check

This commit is contained in:
Martine Lenders 2021-01-08 15:22:31 +01:00
parent 741aaf9a38
commit 375df5740a
No known key found for this signature in database
GPG Key ID: CCD317364F63286F
3 changed files with 0 additions and 52 deletions

View File

@ -32,8 +32,5 @@ jobs:
run:
git fetch origin '${{ github.base_ref }}:${{ github.base_ref }}'
- name: Run checks
env: # enforce deactivation of label check in pr_check
TRAVIS_PULL_REQUEST:
CI_PULL_NR:
run: |
./dist/tools/${{ matrix.check }}/check.sh "${{ github.base_ref }}"

View File

@ -11,7 +11,6 @@
cd $RIOTBASE
: "${RIOTTOOLS:=${RIOTBASE}/dist/tools}"
. "${RIOTTOOLS}"/pr_check/check_labels.sh
EXIT_CODE=0
@ -45,16 +44,4 @@ if [ -n "${SQUASH_COMMITS}" ]; then
EXIT_CODE=1
fi
if [ -n "$TRAVIS_PULL_REQUEST" -o -n "$CI_PULL_NR" ]; then
if check_gh_label "CI: needs squashing"; then
echo -e "${CERROR}Pull request needs squashing according to its labels set on GitHub${CRESET}"
EXIT_CODE=1
fi
if check_gh_label "State: waiting for other PR"; then
echo -e "${CERROR}Pull request is waiting for another pull request according to its labels set on GitHub${CRESET}"
EXIT_CODE=1
fi
fi
exit ${EXIT_CODE}

View File

@ -1,36 +0,0 @@
#!/usr/bin/env bash
#
# Copyright (C) 2014 Martine Lenders <mlenders@inf.fu-berlin.de>
#
# This file is subject to the terms and conditions of the GNU Lesser
# General Public License v2.1. See the file LICENSE in the top level
# directory for more details.
#
# The following script part has been moved here from:
# ./dist/tools/pr_check/check.sh
GITHUB_API_HOST="https://api.github.com"
GITHUB_REPO="RIOT-OS/RIOT"
if which wget &> /dev/null; then
GET="wget -O -"
elif which curl &> /dev/null; then
GET="curl"
else
echo "Script needs wget or curl" >&2
exit 2
fi
if [ -n "$TRAVIS_PULL_REQUEST" ]; then
LABELS_JSON=$(${GET} "${GITHUB_API_HOST}/repos/${GITHUB_REPO}/issues/${TRAVIS_PULL_REQUEST}/labels" 2> /dev/null)
elif [ -n "$CI_PULL_LABELS" ]; then
LABELS_JSON="$CI_PULL_LABELS"
fi
check_gh_label() {
LABEL="${1}"
echo "${LABELS_JSON}" | grep -q "${LABEL}"
return $?
}