infra: travis: update for PR description validation

This commit is contained in:
Roman Ivanov 2016-02-23 09:04:09 -08:00
parent 25621a3c33
commit adeb2cf187
1 changed files with 8 additions and 6 deletions

View File

@ -303,12 +303,14 @@ matrix:
- CMD5=" && echo 'Issue number:'\$ISSUE_NUMBER "
- CMD6=" && if [[ \$ISSUE_NUMBER =~ ^#[0-9]+$ ]]; then "
- CMD7=" LINK_PR=https://api.github.com/repos/checkstyle/checkstyle/pulls/$TRAVIS_PULL_REQUEST "
- CMD8=" && RESULT=\$(curl -s -H 'Authorization: token $GITHUB_AUTH_TOKEN' \$LINK_PR | jq '.body' | grep \$ISSUE_NUMBER) "
- CMD9=" && echo 'PR Description grepped:'\$RESULT "
- CMD10=" && if [[ -z \$RESULT ]]; then echo 'Please put a reference of Issue to PR description, this will bind Issue and PR in Github'; sleep 2; exit 1; fi "
- CMD11=" fi "
- CMD12=" && echo 'PR validation succeed.'"
- CMD=$CMD0$CMD1$CMD2$CMD3$CMD4$CMD5$CMD6$CMD7$CMD8$CMD9$CMD10$CMD11$CMD12
- CMD8=" && RESULT=\$(curl -s -H 'Authorization: token $GITHUB_AUTH_TOKEN' \$LINK_PR | jq '.body' | grep \$ISSUE_NUMBER | cat ) "
- CMD9=" && echo 'PR Description grepped:'\$RESULT; "
- CMD10=" fi "
- CMD11=" && if [[ -z \$RESULT ]]; then "
- CMD12=" echo 'Please put a reference of Issue to PR description, this will bind Issue and PR in Github' && false; "
- CMD13=" else echo 'PR validation succeed.';
- CMD14=" fi "
- CMD=$CMD0$CMD1$CMD2$CMD3$CMD4$CMD5$CMD6$CMD7$CMD8$CMD9$CMD10$CMD11$CMD12$CMD13$CMD14
- COVERAGE_CMD=""