#!/bin/sh while read oldrev newrev ref do echo "STARTING [$oldrev $newrev $ref]" email=`git log $newrev --format=%ce -n 1` name=`git log $newrev --format=%cn -n 1` message=`git log $newrev --format=%B -n 1` echo $email wget --post-data "payload={\"ref\":\"$ref\", \ \"after\":\"$newrev\", \ \"commits\": \ [{ \ \"id\":\"$newrev\", \ \"author\":{\"email\":\"$email\", \"name\":\"$name\"}, \ \"message\":\"$message\" \ }] \ }" https://railsonfire.com/hook/<%= config[:uuid] %> done