1
0
mirror of https://github.com/ru-de/faq.git synced 2024-11-10 04:31:01 +00:00

Travis #879: sync github pages

This commit is contained in:
Travis CI 2018-06-07 20:10:19 +00:00
parent 3a10af91db
commit 6feceb2568
2 changed files with 8 additions and 7 deletions

View File

@ -30,10 +30,10 @@ for dic in $dicList
done done
go get ./... go get ./...
go get -u github.com/ewgRa/ci-utils/utils/diff_liner go get -u github.com/ewgRa/ci-utils/cmd/diff_liner
go get -u github.com/ewgRa/ci-utils/utils/hunspell_parser go get -u github.com/ewgRa/ci-utils/cmd/hunspell_parser
go get -u github.com/ewgRa/ci-utils/utils/github_comments_diff go get -u github.com/ewgRa/ci-utils/cmd/github_comments_diff
go get -u github.com/ewgRa/ci-utils/utils/github_comments_send go get -u github.com/ewgRa/ci-utils/cmd/github_comments_send
go build -o /tmp/check_spell $DIR/go/check_spell/main.go go build -o /tmp/check_spell $DIR/go/check_spell/main.go
go build -o /tmp/check_links $DIR/go/check_links/main.go go build -o /tmp/check_links $DIR/go/check_links/main.go

View File

@ -36,15 +36,16 @@ jq -s '[.[][]]' /tmp/comments.json > /tmp/comments_array.json
cat /tmp/comments_array.json cat /tmp/comments_array.json
OUTPUT=$(cat /tmp/comments_array.json | grep "\[]"); EXIT_CODE=0
EXIT_CODE=$?
if [ $EXIT_CODE -ne 0 ]; then if [ "$(cat /tmp/comments_array.json)" != "[]" ]; then
curl -s https://api.github.com/repos/$TRAVIS_REPO_SLUG/pulls/$TRAVIS_PULL_REQUEST/comments > /tmp/pr_comments.json 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 github_comments_diff -comments /tmp/comments_array.json -exists-comments /tmp/pr_comments.json > /tmp/send_comments.json
curl -XPOST "https://github-api-bot.herokuapp.com/send_review?repo=$TRAVIS_REPO_SLUG&pr=$TRAVIS_PULL_REQUEST&body=Спасибо%20за%20PR.%20Обратите%20внимание%20на%20результаты%20автоматической%20проверки%20орфографии%20и%20ссылок" -d @/tmp/send_comments.json curl -XPOST "https://github-api-bot.herokuapp.com/send_review?repo=$TRAVIS_REPO_SLUG&pr=$TRAVIS_PULL_REQUEST&body=Спасибо%20за%20PR.%20Обратите%20внимание%20на%20результаты%20автоматической%20проверки%20орфографии%20и%20ссылок" -d @/tmp/send_comments.json
EXIT_CODE=1
fi fi
exit $EXIT_CODE exit $EXIT_CODE