Re: post-receive webhooks for git

2020-12-06 Thread Ed Wong
Mads Kiilerich wrote:
> 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.
> 

Hi Mads,

I understand about the supporting old versions.  Turning into a
yak shaving experience with installing a newer version of
python etc..   Might just stand up a new CentOS system.

> 
> The hooks support is a bit half baked.

> 
> 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 ...
Nope. I'm using Git.

> 
> 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
> .

I've looked at the thread but need to get acquainted with the code.

I'm guessing that each repository needs some ui to add hook code so that
Kallithea, which would be more of a natural way [kinda like how github
has git hooks] than creating a Kallithea extension.  But as it stands,
I have no idea how it would work.  As far as I understand post-receive
hooks and say, Jenkins,  it basically requires some sort of
authorization token and a specific url that triggers the CI.
The more I think of it, the more complicated it feels.   Again,
will need to sit down and understand what the code does.

Thanks

Edmund


> 
> 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
> 

___
kallithea-general mailing list
kallithea-general@sfconservancy.org
https://lists.sfconservancy.org/mailman/listinfo/kallithea-general


Re: post-receive webhooks for git

2020-12-02 Thread Mads Kiilerich

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

___
kallithea-general mailing list
kallithea-general@sfconservancy.org
https://lists.sfconservancy.org/mailman/listinfo/kallithea-general