Now you can associate a GIT or SVN based commit from Beanstalk to a specific Pivotal Tracker story. Their commit messages will show up as comments on the Pivotal Tracker story and can even change the story state (see 'Use' below on how to format your commit messages).
This PHP script takes Beanstalk's web hooks integration data and formats it for Pivotal Tracker's SCM post-commit hook integration. It parses the Beanstalk JSON payload and sends the request to the Pivotal Tracker SCM API endpoint in the correctly formatted XML it requires.
Place this script somewhere accessible on a server running PHP
It's recommended to put this script behind HTTP authentication. Once protected, add a Beanstalk post-commit hook pointing to the following url:
Replace SCRIPT URL with the url of where the script is located.
Open the commits.php and place your Pivotal Tracker API Token where it says:
$pivotalAPIToken = 'PLACE API TOKEN HERE';
And you should be good to go!
Once setup, you can format commit messages as specified here
Pivotal's SCM doesn't seem to process line breaks so if your commit message has line breaks, don't be surprised if it doesn't show up in the story comment.