From 2ab976572e360d887585a93d8091f20cf92d70f9 Mon Sep 17 00:00:00 2001 From: Evgeniy Sokolov Date: Sun, 13 May 2018 22:21:13 +0200 Subject: [PATCH] fix run non PR ci (#392) * test fail * if it is not a PR, just output comments * fix * test * revert changes back --- files/check.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/files/check.sh b/files/check.sh index be0dd87..357f267 100644 --- a/files/check.sh +++ b/files/check.sh @@ -29,6 +29,10 @@ done < /tmp/changed_files jq -s '[.[][]]' /tmp/comments.json > /tmp/comments_array.json +cat /tmp/comments_array.json + +[ "${TRAVIS_PULL_REQUEST}" != "false" ] || exit 0 + curl -s https://api.github.com/repos/$TRAVIS_REPO_SLUG/pulls/$TRAVIS_PULL_REQUEST/comments > /tmp/pr_comments.json github_comments_diff -comments /tmp/comments_array.json -exists-comments /tmp/pr_comments.json > /tmp/send_comments.json @@ -40,6 +44,4 @@ if [ $EXIT_CODE -ne 0 ]; then github_comments_send -file /tmp/send_comments.json -repo $TRAVIS_REPO_SLUG -pr $TRAVIS_PULL_REQUEST fi -cat /tmp/comments_array.json - exit $EXIT_CODE