ci - announce QA build to GitHub pull request

feature/default_network_editable
kumavis 7 years ago
parent f7b4c9621f
commit d06c6bb4ca
  1. 12
      .circleci/config.yml

@ -100,6 +100,18 @@ jobs:
- dist - dist
- store_artifacts: - store_artifacts:
path: dist/mascara path: dist/mascara
- run:
name: build:announce
command: |
CIRCLE_PR_NUMBER="${CIRCLE_PR_NUMBER:-${CIRCLE_PULL_REQUEST##*/}}"
SHORT_SHA1=$(echo $CIRCLE_SHA1 | cut -c 1-7)
QA_BUILD_URL="https://$CIRCLE_BUILD_NUM-42009758-gh.circle-artifacts.com/0/home/circleci/project/dist/mascara/home.html"
COMMENT_BODY="[Try QA Build for $SHORT_SHA1]($QA_BUILD_URL)"
JSON_PAYLOAD="{\"body\":\"$COMMENT_BODY\"}"
POST_COMMENT_URI="https://api.github.com/repos/metamask/metamask-extension/issues/$CIRCLE_PR_NUMBER/comments"
echo "Announcement:\n$COMMENT_BODY"
echo "Posting to $POST_COMMENT_URI"
curl -d "$JSON_PAYLOAD" -H "Authorization: token $GITHUB_COMMENT_TOKEN" $POST_COMMENT_URI
prep-scss: prep-scss:
docker: docker:

Loading…
Cancel
Save