summaryrefslogtreecommitdiff
path: root/.travis.yml
diff options
context:
space:
mode:
authorWu Xiaotian <[email protected]>2019-03-05 11:14:53 +0800
committerraveit65 <[email protected]>2019-03-08 09:22:11 +0100
commiteb9c0abe8f82e46d721ef2f134f1f56bcab98a81 (patch)
treef02e6e9b026306183933bb9ec556c5658564eaee /.travis.yml
parentd8b38f2600db28148fed1ce48355080fce15bb5d (diff)
downloadcaja-eb9c0abe8f82e46d721ef2f134f1f56bcab98a81.tar.bz2
caja-eb9c0abe8f82e46d721ef2f134f1f56bcab98a81.tar.xz
[ci] Use status notification
Diffstat (limited to '.travis.yml')
-rw-r--r--.travis.yml11
1 files changed, 8 insertions, 3 deletions
diff --git a/.travis.yml b/.travis.yml
index bddb4f89..5905a1d4 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"