post-receive webhooks for git
Mads Kiilerich
mads at kiilerich.com
Wed Dec 2 15:15:28 UTC 2020
On 12/2/20 4:49 AM, Ed Wong wrote:
> Hi,
>
> I'm using version 0.5.0 (due to system still using python.27).
I think all OSes make it easy to install Python 3 side by side with
Python 2 without any further impact. I suggest upgrading. We don't have
resources to support old versions.
> I've been looking at the documentation for hooks and have looked at the
> Admin->Settings->Hooks; but I can't make heads or tails in how
> to set up a hook which gets triggered when someone pushes to the
> repo.
>
>
> I see that in the main repo there is a hooks dir with the post-receive
> hook but with the "don't customize it manually" warning.
>
> Where do I make changes to the post-receive hook?
The hooks support is a bit half baked.
Primarily, Kallithea use hooks internally to achieve some functionality.
Modifying these will conceptually be like modifying Kallithea itself,
and they are thus quite hardcoded.
Are you using Mercurial? Then it is quite easy to add additinoal custom
hooks of any kind through the UI. Thinking about it, I guess we should
clarify in the UI that the hooks settings is for Mercurial only ...
The Git hook functionality only allows for one hook of each kind - and
has other hook entry points and a different hook API than Mercurial. It
is not feasible to make them equal. But see Tim Ooms' related proposal
in
https://lists.sfconservancy.org/pipermail/kallithea-general/2020q4/thread.html#3241
.
Extensions (
https://kallithea.readthedocs.io/en/default/usage/customization.html#behavioral-customization-kallithea-extensions
) allow some more high level hooks, more consistent across Git and
Mercurial, but they are global and do not have any UI.
/Mads
More information about the kallithea-general
mailing list