[linux-elitists] git hook for identica ?
Thu Dec 18 02:07:19 PST 2008
On Wed, 17 Dec 2008, Greg KH wrote:
> On Thu, Dec 18, 2008 at 03:59:26PM +1100, James Morris wrote:
> > I'd like to have git commits published to an identica account. What's the
> > best way to do this?
> > It seems I can use notify-webhook and commitbot, although I'm wondering if
> > there's a simpler approach with fewer dependencies.
> A simple bash script for the hook on the git server, and then use bti
> which only has libcurl as a dependancy:
> That should be pretty small.
Thanks! Now up and running at http://identi.ca/securitytestingtree
This is the post-receive script I hacked up:
read oldrev newrev refname
/usr/bin/git rev-list $oldrev...$newrev --no-merges --pretty=format:"%h|%ae|%s" --abbrev-commit | grep -v ^commit | while read a; do
echo "$short_refname|$a" | cut -f-140 | ~/bin/bti
I'm sure it can be greatly improved.
More information about the linux-elitists