docbrown/after_deploy.sh
Mac Siri 9e19593559 Change mods-actions' display logic (#630)
* Add username to deploy-track

* Change mod-actions' show logic

* Remove comment
2018-07-27 11:55:14 -07:00

10 lines
476 B
Bash

#!/bin/bash
REPOSITORY=https://github.com/thepracticaldev/dev.to_private/
REVISION="$(git rev-parse HEAD)"
COMMIT_AUTHOR=$(git --no-pager log -1 --pretty=format:'%an')
PAYLOAD='{ "environment":"production", "repository":"'${REPOSITORY}'", "revision":"'${REVISION}'", "username":"'${COMMIT_AUTHOR}'"}'
curl -X POST \
-H "Content-Type: application/json" \
-d "${PAYLOAD}" \
"https://airbrake.io/api/v4/projects/${AIRBRAKE_PROJECT_ID}/deploys?key=${AIRBRAKE_PROJECT_KEY}"