<div dir="auto">Hi Eivind, all,<div dir="auto"><br></div><div dir="auto">I proposed a basic pull request creation hook here:</div><div dir="auto"><a href="https://kallithea-scm.org/repos/kallithea-incoming/changeset/1b788fd4ceeebf5b29ad8555b2f6e3e4822b8e7d">https://kallithea-scm.org/repos/kallithea-incoming/changeset/1b788fd4ceeebf5b29ad8555b2f6e3e4822b8e7d</a><br></div><div dir="auto"><br></div><div dir="auto">It allows to implement the hook in the extensions package, per instance. For my own instance, I used the requests package to trigger a jenkins job, depending on the repo (the urllib package gave me headaches). In the hook, I add a specific user as reviewer. The Jenkins job will pull the changes, perform validation, then post a comment with the results to the PR and approves/rejects it.</div><div dir="auto"><br></div><div dir="auto">Best regards,</div><div dir="auto">Thomas</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Jun 7, 2020, 11:32 Eivind Kvedalen <<a href="mailto:eivind.kvedalen@gmail.com">eivind.kvedalen@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>Due to other more urgent tasks, I have not had time to look more into this. My need is to be able to POST updates to a configured URL (preferably a common one, but per-repository customizable should also be supported).</div><div><br></div><div>Best regards,</div><div>Eivind</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jun 5, 2020 at 1:16 PM Thomas De Schampheleire <<a href="mailto:patrickdepinguin@gmail.com" target="_blank" rel="noreferrer">patrickdepinguin@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Eivind,<br>
<br>
Did you find a solution already?<br>
Could you share it?<br>
<br>
I also have an interest in pull request hooks now, which could either<br>
be implemented via an rcextensions hook as suggested below, which is<br>
then fully up to the admin, or e.g. by allowing to register a<br>
webhook-like URL per repository directly in Kallithea, letting<br>
Kallithea notify the configured webhook via HTTP POST.<br>
<br>
The approach of a webhook is more standard I think, any customization<br>
of what to do exactly can then be done at the other end.<br>
But using rcextensions is less work initially and has more flexibility<br>
and power at Kallithea side, as you can access all internals.<br>
But also, both approaches could co-exist.<br>
<br>
In any case, if possible I'd like to build on what you already have.<br>
<br>
Thanks,<br>
Thomas<br>
<br>
<br>
El mié., 6 may. 2020 a las 19:09, Mads Kiilerich<br>
(<<a href="mailto:mads@kiilerich.com" target="_blank" rel="noreferrer">mads@kiilerich.com</a>>) escribió:<br>
><br>
> On 5/3/20 10:40 AM, Eivind Kvedalen wrote:<br>
> > Hi,<br>
> ><br>
> > I'm trying to integrate Kallithea with an issue tracker, and I would<br>
> > like to get notifications (not email, but something I could create an<br>
> > API request from) when a pull request is created or updated. Are there<br>
> > any hooks available for this already? If not, ideas on how to<br>
> > implement it is welcome!<br>
><br>
><br>
> Kallithea currently has no such hook.<br>
><br>
> Similar hooks are in the hold rcextensions -<br>
> <a href="https://kallithea.readthedocs.io/en/stable/usage/customization.html#behavioral-customization-rcextensions" rel="noreferrer noreferrer" target="_blank">https://kallithea.readthedocs.io/en/stable/usage/customization.html#behavioral-customization-rcextensions</a><br>
> . For example, kallithea/model/user.py will call log_create_user which<br>
> in turn will call CREATE_USER_HOOK .<br>
><br>
> Similarly, the hook you ask for could be added with a call from<br>
> kallithea/model/pull_request.py .<br>
><br>
> The whole rcextension system would be nice to get cleaned up. For<br>
> example, the name "rc" is an old leftover. Also, while there for example<br>
> is a hook for created repos, there is no hook for renaming repos. But<br>
> for a start, we could try to add the hooks you ask for.<br>
><br>
> /Mads<br>
><br>
><br>
> _______________________________________________<br>
> kallithea-general mailing list<br>
> <a href="mailto:kallithea-general@sfconservancy.org" target="_blank" rel="noreferrer">kallithea-general@sfconservancy.org</a><br>
> <a href="https://lists.sfconservancy.org/mailman/listinfo/kallithea-general" rel="noreferrer noreferrer" target="_blank">https://lists.sfconservancy.org/mailman/listinfo/kallithea-general</a><br>
</blockquote></div>
</blockquote></div>