pr_check: remove label check
This commit is contained in:
parent
741aaf9a38
commit
375df5740a
3
.github/workflows/check-pr.yml
vendored
3
.github/workflows/check-pr.yml
vendored
@ -32,8 +32,5 @@ jobs:
|
|||||||
run:
|
run:
|
||||||
git fetch origin '${{ github.base_ref }}:${{ github.base_ref }}'
|
git fetch origin '${{ github.base_ref }}:${{ github.base_ref }}'
|
||||||
- name: Run checks
|
- name: Run checks
|
||||||
env: # enforce deactivation of label check in pr_check
|
|
||||||
TRAVIS_PULL_REQUEST:
|
|
||||||
CI_PULL_NR:
|
|
||||||
run: |
|
run: |
|
||||||
./dist/tools/${{ matrix.check }}/check.sh "${{ github.base_ref }}"
|
./dist/tools/${{ matrix.check }}/check.sh "${{ github.base_ref }}"
|
||||||
|
|||||||
13
dist/tools/pr_check/check.sh
vendored
13
dist/tools/pr_check/check.sh
vendored
@ -11,7 +11,6 @@
|
|||||||
cd $RIOTBASE
|
cd $RIOTBASE
|
||||||
|
|
||||||
: "${RIOTTOOLS:=${RIOTBASE}/dist/tools}"
|
: "${RIOTTOOLS:=${RIOTBASE}/dist/tools}"
|
||||||
. "${RIOTTOOLS}"/pr_check/check_labels.sh
|
|
||||||
|
|
||||||
EXIT_CODE=0
|
EXIT_CODE=0
|
||||||
|
|
||||||
@ -45,16 +44,4 @@ if [ -n "${SQUASH_COMMITS}" ]; then
|
|||||||
EXIT_CODE=1
|
EXIT_CODE=1
|
||||||
fi
|
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}
|
exit ${EXIT_CODE}
|
||||||
|
|||||||
36
dist/tools/pr_check/check_labels.sh
vendored
36
dist/tools/pr_check/check_labels.sh
vendored
@ -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 $?
|
|
||||||
}
|
|
||||||
Loading…
x
Reference in New Issue
Block a user