Skip to content

Instantly share code, notes, and snippets.

@ckdarby
Last active August 29, 2015 14:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ckdarby/c6eef8fc1791de3ec90f to your computer and use it in GitHub Desktop.
Save ckdarby/c6eef8fc1791de3ec90f to your computer and use it in GitHub Desktop.
#!/bin/sh
SLACK_WEBHOOK_URL=$(git config --get hooks.slack.webhook-url)
SLACK_USERNAME="Deploy Bot"
REPO_PATH="$(dirname ${BASH_SOURCE[0]})/.."
GIT_MESSAGE=$(git --git-dir ${REPO_PATH} show -l 1 -s)
curl -X POST --data "payload={ \"username\": \"${SLACK_USERNAME}\", \"text\": \"${GIT_MESSAGE}\"}" ${SLACK_WEBHOOK_URL}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment