From f8423ed2d1c2b0600c64992fdc383ffcb8291c6f Mon Sep 17 00:00:00 2001 From: Jeroen Willemsen Date: Thu, 16 May 2019 08:09:47 +0200 Subject: [PATCH] #1204: updated PR feedback loop --- .travis.yml | 2 -- Tools/gendocs.sh | 9 ++++++--- Tools/report_to_github.sh | 8 -------- 3 files changed, 6 insertions(+), 13 deletions(-) delete mode 100755 Tools/report_to_github.sh diff --git a/.travis.yml b/.travis.yml index 0c48cdf238..1753378de8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,5 +28,3 @@ deploy: on: repo: OWASP/owasp-mstg tags: true -after_success: -- "./Tools/report_to_github.sh" diff --git a/Tools/gendocs.sh b/Tools/gendocs.sh index 2e84f69c21..cf2f0c53fe 100755 --- a/Tools/gendocs.sh +++ b/Tools/gendocs.sh @@ -3,15 +3,18 @@ cd $TRAVIS_BUILD_DIR/Tools echo "Applying Linter check" sh ./Apply_Linter_Check.sh echo "Counting amount of linter issues:" -export RESULT=$(wc -l ../linter-result.out) +LINTRESULT=$(wc -l ../linter-result.out) echo $RESULT if [ "$TRAVIS_PULL_REQUEST" != "false" ] ; then echo "Applying Link check" - sh ./Apply_Link_Check.sh + LINKRESULT:$(sh ./Apply_Link_Check.sh) + curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST \ + -d "{\"body\": \"Broken link result: $LINKRESULT, markdown result: $LINTRESULT\"}" \ + "https://api.github.com/repos/${TRAVIS_REPO_SLUG}/issues/${TRAVIS_PULL_REQUEST}/comments" fi if [ -z "$TRAVIS_TAG" ]; then exit 0; fi echo "Running creaton of pdfs and word documents" sh ./gitbookepubandpdf.sh $TRAVIS_TAG -sh ./generate_document.sh +sh ./generate_document.sh \ No newline at end of file diff --git a/Tools/report_to_github.sh b/Tools/report_to_github.sh deleted file mode 100755 index 177a9c9a78..0000000000 --- a/Tools/report_to_github.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -if [ "$TRAVIS_PULL_REQUEST" != "false" ] ; then - echo "Testing result" - echo $RESULT - curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST \ - -d "{\"body\": \"Hello world $RESULT\"}" \ - "https://api.github.com/repos/${TRAVIS_REPO_SLUG}/issues/${TRAVIS_PULL_REQUEST}/comments" -fi