1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

Merge pull request #5048 from kaspar030/adapt_prcheck_to_murdock

dist: tools: pr_check: adapt to RIOT CI
This commit is contained in:
Martine Lenders 2016-03-12 16:54:19 +01:00
commit 1033c880a5
2 changed files with 6 additions and 2 deletions

View File

@ -22,7 +22,11 @@ else
exit 2
fi
LABELS_JSON=$(${GET} "${GITHUB_API_HOST}/repos/${GITHUB_REPO}/issues/${TRAVIS_PULL_REQUEST}/labels" 2> /dev/null)
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}"

View File

@ -33,7 +33,7 @@ if [ -n "${SQUASH_COMMITS}" ]; then
EXIT_CODE=1
fi
if [ -n "$TRAVIS_PULL_REQUEST" ]; then
if [ -n "$TRAVIS_PULL_REQUEST" -o -n "$CI_PULL_NR" ]; then
if check_gh_label "NEEDS SQUASHING"; then
echo -e "${CERROR}Pull request needs squashing according to its labels set on GitHub${CRESET}"
EXIT_CODE=1