Hi Eivind, all, I proposed a basic pull request creation hook here: https://kallithea-scm.org/repos/kallithea-incoming/changeset/1b788fd4ceeebf5b29ad8555b2f6e3e4822b8e7d
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. Best regards, Thomas On Sun, Jun 7, 2020, 11:32 Eivind Kvedalen <eivind.kveda...@gmail.com> wrote: > Hi, > > 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). > > Best regards, > Eivind > > On Fri, Jun 5, 2020 at 1:16 PM Thomas De Schampheleire < > patrickdeping...@gmail.com> wrote: > >> Hi Eivind, >> >> Did you find a solution already? >> Could you share it? >> >> I also have an interest in pull request hooks now, which could either >> be implemented via an rcextensions hook as suggested below, which is >> then fully up to the admin, or e.g. by allowing to register a >> webhook-like URL per repository directly in Kallithea, letting >> Kallithea notify the configured webhook via HTTP POST. >> >> The approach of a webhook is more standard I think, any customization >> of what to do exactly can then be done at the other end. >> But using rcextensions is less work initially and has more flexibility >> and power at Kallithea side, as you can access all internals. >> But also, both approaches could co-exist. >> >> In any case, if possible I'd like to build on what you already have. >> >> Thanks, >> Thomas >> >> >> El mié., 6 may. 2020 a las 19:09, Mads Kiilerich >> (<m...@kiilerich.com>) escribió: >> > >> > On 5/3/20 10:40 AM, Eivind Kvedalen wrote: >> > > Hi, >> > > >> > > I'm trying to integrate Kallithea with an issue tracker, and I would >> > > like to get notifications (not email, but something I could create an >> > > API request from) when a pull request is created or updated. Are there >> > > any hooks available for this already? If not, ideas on how to >> > > implement it is welcome! >> > >> > >> > Kallithea currently has no such hook. >> > >> > Similar hooks are in the hold rcextensions - >> > >> https://kallithea.readthedocs.io/en/stable/usage/customization.html#behavioral-customization-rcextensions >> > . For example, kallithea/model/user.py will call log_create_user which >> > in turn will call CREATE_USER_HOOK . >> > >> > Similarly, the hook you ask for could be added with a call from >> > kallithea/model/pull_request.py . >> > >> > The whole rcextension system would be nice to get cleaned up. For >> > example, the name "rc" is an old leftover. Also, while there for example >> > is a hook for created repos, there is no hook for renaming repos. But >> > for a start, we could try to add the hooks you ask for. >> > >> > /Mads >> > >> > >> > _______________________________________________ >> > kallithea-general mailing list >> > kallithea-general@sfconservancy.org >> > https://lists.sfconservancy.org/mailman/listinfo/kallithea-general >> >
_______________________________________________ kallithea-general mailing list kallithea-general@sfconservancy.org https://lists.sfconservancy.org/mailman/listinfo/kallithea-general