Closed sdegrande closed 2 years ago
@TkTech : would you please mind having a look at that PR, and possibly merge it or request some changes ?
I'll have time to look at this on Sunday, thanks for the contribution!
I like having the separate service for Gitea, since it may diverge more in the future, but I think we can reduce quite a bit of the duplication unless I'm missing something. Like the form could be a subclass of the Github form, right? Most of the differences are in the payload.
Thanks for your reply.
The events lists are different (some names are changed, there's at least one additional event and some github events do not exists in gitea). That list could possibly be somehow a parameter of ConfigForm, I guess, but there's also one config option that does not make sense for Gitea. So 2 config 'widgets' are not shared.
There are some 'minor' changes in the payload.
So, yes, most of the code is duplicated. Same goes with gitlab.py, actually, that's why I did not try to factorize the code.
The difference of code between those 3 hooks is sometimes quite "subtle", so factorizing in a base class is perhaps not that easy.
Works for me, thanks again for the contribution. It might take a day or two to deploy, our CI provider doesn't do open source anymore and the deploy tools I used for this project a decade ago don't work anymore 😆 I'll move over to GitHub actions.
Thanks for the merge, and thanks for your work !
Hello, @TkTech. Any ETA ?
The host for n.tkte.ch is switching to hetzner, just twiddling my thumbs waiting for their support to get it running.
@sdegrande progressing in #207
Deployed, and future deployments are automatic.
Great ! Thanks a lot.
This proposed Gitea hook is based on the code of the GitHub's hook.
Fixes #178