Skip to content

Instantly share code, notes, and snippets.

View mwlang's full-sized avatar

Michael Lang mwlang

View GitHub Profile
@mwlang
mwlang / post-receive.sh
Created March 3, 2016 22:35 — forked from bokenator/post-receive.sh
git PT integration
#!/usr/bin/env bash
# post-receive
# Get config variables
api_token=$(git config --get hooks.pivotal-tracker.api-token)
pid=$(git config --get hooks.pivotal-tracker.project-id)
branch=$(git config --get hooks.pivotal-tracker.integration-branch)
mark_accepted () {
curl --silent -X PUT -H "X-TrackerToken: $api_token" -H "Content-Type: application/json" -d '{"current_state": "accepted"}' "https://www.pivotaltracker.com/services/v5/projects/$pid/stories/$1" > /dev/null