Supybot-plugins icon indicating copy to clipboard operation
Supybot-plugins copied to clipboard

GitHub/feature-request: Gitea webhook support

Open Mikaela opened this issue 4 years ago • 1 comments

This may be a bit out of scope, but I think Gitea webhooks are partially supported already as I tried adding one and got this test hook output:

2021-157 16:21:02 EEST <%R-66Y> $repository__owner__name/scripts (in master): Mikaela Suomalainen committed acmesh-ssl.bash: add WeeChat relay https://gitea.blesmrt.net/mikaela/scripts/commit/0aa2668c7929dfe710315cd553b80fadbac3eaa2

  • https://docs.gitea.io/en-us/webhooks/

Gitea doesn't currently support RSS feeds (https://github.com/go-gitea/gitea/issues/569) so getting announcements on what happens there is dependent on webhooks.

Mikaela avatar Jun 06 '21 13:06 Mikaela

During the four days that I have abused the plugin for Gitea instead of GitHub, I haven't noticed other issues than the $repository__owner__name in the original submision and a $ref__branch when a Gitea instance (or two) automatically synced a mirror from a remote.

  • 2021-161 01:10:08 EEST <%R-66Y> $repository__owner__name/pgp-alt-wot (in $ref__branch): Mikaela Suomalainen committed minisign: add own public key & releated things https://git.piraattipuolue.fi/mikaela/pgp-alt-wot/commit/2b72f9d247975b990d8d1bde45ec7e46531775b9
  • 2021-161 05:14:20 EEST <%R-66Y> $repository__owner__name/shell-things (in $ref__branch): Mikaela Suomalainen committed mpv.conf: comment drivers (+ explain it) https://git.snopyta.org/mikaela/shell-things/commit/c210b2723ef5f45d68ea7a8a3a6c62c94f389f6a

I don't know if there are additional event types or different names that GItHub doesn't support or if sync events appear differently from pushes to webhooks, considering how Gitea UI distinguishes them:

screenshot on the two Gitea activities

Typing this I have also became aware of two related Gitea issues.

  • https://github.com/go-gitea/gitea/issues/11755 - Deprecating and removing shared secret from webhook payloads (I wonder if it can possibly affect this plugin?)
  • https://github.com/go-gitea/gitea/issues/9485 - Webhook payload documentation
    • https://github.com/drone/go-scm/tree/master/scm/driver/gitea provides examples that I refer to when looking into working with receiving webhooks

      • said techknowlogick

Mikaela avatar Jun 10 '21 11:06 Mikaela