Webhooks - Creating a webhook for all repos

178 views
Skip to first unread message

Bruno Alexandre

unread,
Jan 21, 2015, 4:51:25 AM1/21/15
to gito...@googlegroups.com
Hi,

We use Gitolite to manage user permissions in our repos, and we got to a point that the team started to be big and that we wanted a tool to keep a heartbeat when someone do a commit...

As we are using Slack and they have a great integration tool, we've set up an incoming webhook that would post any information passed into a #status channel.

Now we are trying to make all this work in gitolite.

From the docs @ http://gitolite.com/gitolite/g2/hooks.html I can see that there are very few variables to use, actually only GL_USER is useful in our case but I was wondering...

Where can we get the commit message and actual commit id? Is there a way do retrieve this at all?

Thank you.

milk

unread,
Jan 21, 2015, 10:43:08 AM1/21/15
to Bruno Alexandre, gitolite
You can implement your "webhook" as a standard git post-receive:
https://www.kernel.org/pub/software/scm/git/docs/githooks.html. I
leave the exercise of figuring out the input to the hooks to you as it
is all in that git documentation.
Where gitolite comes into play is how the hook gets put in place
(custom hooks section).
> --
> You received this message because you are subscribed to the Google Groups "gitolite" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to gitolite+u...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Hope is a dimension of the spirit. It is not outside us, but within
us. When you lose it, you must seek it again within yourself and in
people around you -- not in objects or even events. -
-Vaclav Havel
Reply all
Reply to author
Forward
0 new messages