diff options
author | Roman Ivanov <ivanov-jr@mail.ru> | 2016-12-10 16:21:06 -0800 |
---|---|---|
committer | Roman Ivanov <romani@users.noreply.github.com> | 2016-12-11 06:19:07 -0800 |
commit | bd5ea09b31a5154a39614e930ed62cdb33b085e5 (patch) | |
tree | 0136754846231d3c1c340bc97961e3d86cbff6b3 /.travis.yml | |
parent | 4f64bd427a865d5cd774508d20d1a6e971e97a13 (diff) | |
download | checkstyle-bd5ea09b31a5154a39614e930ed62cdb33b085e5.tar.gz |
Issue #3632: pr description validation is moved to shell script
Diffstat (limited to '.travis.yml')
-rw-r--r-- | .travis.yml | 30 |
1 files changed, 2 insertions, 28 deletions
diff --git a/.travis.yml b/.travis.yml index 0d051b485..b2f541771 100644 --- a/.travis.yml +++ b/.travis.yml @@ -285,34 +285,8 @@ matrix: # testing of PR format - env: - DESC="test Issue ref in PR description" - - CMD_="set -e" - - CMD0=" && if [[ ! $TRAVIS_PULL_REQUEST =~ ^([0-9]*)$ ]]; then exit 0; fi " - - CMD1=" && LINK_COMMITS=https://api.github.com/repos/checkstyle/checkstyle/pulls/$TRAVIS_PULL_REQUEST/commits " - - CMD2=" && COMMITS=\$(curl -s -H 'Authorization: token $GITHUB_AUTH_TOKEN' \$LINK_COMMITS | jq '.[0] | .commit.message') " - - CMD3=" && echo 'Messages from github:'\${COMMITS:0:60}... " - - CMD4=" && ISSUE_NUMBER=\$( echo \$COMMITS | sed -e 's/^.*Issue //' | sed -e 's/:.*//') " - - CMD5=" && echo 'Issue number:'\$ISSUE_NUMBER && RESULT=0" - - CMD6=" && if [[ \$ISSUE_NUMBER =~ ^#[0-9]+$ ]]; then " - - CMD7=" LINK_PR=https://api.github.com/repos/checkstyle/checkstyle/pulls/$TRAVIS_PULL_REQUEST " - - CMD8=" && LINK_ISSUE=https://api.github.com/repos/checkstyle/checkstyle/issues/\${ISSUE_NUMBER:1} " - - CMD9=" && REGEXP=(\$ISSUE_NUMBER\|https://github.com/checkstyle/checkstyle/issues/\${ISSUE_NUMBER:1})" - - CMD10=" && PR_DESC=\$(curl -s -H 'Authorization: token $GITHUB_AUTH_TOKEN' \$LINK_PR | jq '.body' | grep -E \$REGEXP | cat ) " - - CMD11=" && echo 'PR Description grepped:'\${PR_DESC:0:80} " - - CMD12=" && if [[ -z \$PR_DESC ]]; then " - - CMD13=" echo 'Please put a reference of Issue to PR description, this will bind Issue and PR in Github' && RESULT=1; " - - CMD14=" fi " - - CMD15=" && LABEL_APRV=\$(curl -s -H 'Authorization: token $GITHUB_AUTH_TOKEN' \$LINK_ISSUE | jq '.labels [] | .name' | grep approved | cat | wc -l ) " - - CMD16=" && if [[ \$LABEL_APRV == 0 ]]; then " - - CMD17=" echo 'You provide PR to Issue that is not approved yes, please ask admins to approve your issue first' && RESULT=1; " - - CMD18=" fi " - - CMD19=" fi " - - CMD20=" && if [[ \$RESULT == 0 ]]; then " - - CMD21=" echo 'PR validation succeed.'; " - - CMD22=" else " - - CMD23=" echo 'PR validation failed.' && false; " - - CMD24=" fi " - - CMD=$CMD_$CMD0$CMD1$CMD2$CMD3$CMD4$CMD5$CMD6$CMD7$CMD8$CMD9$CMD10$CMD11$CMD12$CMD13$CMD14$CMD15 - - CMD=$CMD$CMD16$CMD17$CMD18$CMD19$CMD20$CMD21$CMD22$CMD23$CMD24 + - GOAL="pr-description" + - CMD="./.ci/travis/travis.sh" - COVERAGE_CMD="" # Ensure that all Sevntu check are kused |