summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.travis.yml11
1 files changed, 8 insertions, 3 deletions
diff --git a/.travis.yml b/.travis.yml
index b50b5cb3..3b66e0e5 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -37,9 +37,14 @@ deploy:
after_success:
- 'if [[ "$TRAVIS_SECURE_ENV_VARS" == "true" && "$TRAVIS_PULL_REQUEST" != "false" && ${DISTRO} =~ ^fedora.*$ ]]; then
- COMMENT="[Notification]: Clang Analyzer results of $TRAVIS_COMMIT at https://mate-desktop.github.io/${TRAVIS_REPO_SLUG#*/}/";
- curl -H "Authorization: token $GITHUB_TOKEN" -X POST -d "{\"body\": \"$COMMENT\"}" "https://api.github.com/repos/${TRAVIS_REPO_SLUG}/issues/${TRAVIS_PULL_REQUEST}/comments" >/dev/null;
- fi'
+ REPO_SLUG_ARRAY=(${TRAVIS_REPO_SLUG//\// });
+ REPO_NAME=${REPO_SLUG_ARRAY[1]};
+ URL="https://${REPO_NAME}.mate-desktop.dev";
+ COMMENT="Code analysis completed";
+ curl -H "Authorization: token $GITHUB_TOKEN" -X POST
+ -d "{\"state\": \"success\", \"description\": \"$COMMENT\", \"context\":\"scan-build\", \"target_url\": \"$URL\"}"
+ https://api.github.com/repos/${TRAVIS_REPO_SLUG}/statuses/${TRAVIS_PULL_REQUEST_SHA};
+ fi'
env:
- DISTRO="archlinux/base"