Github webhooks not working?

I’ve several snaps build through the snapcraft.ip/…/builds page. I had thought these had a webhook installed in github, but when a build didn’t happen following changes to https://github.com/MirServer/mir-kiosk-kodi I discovered there’s no webhook on the repo, nor on the others I thought were set up this way.

Disconnecting and reconnecting the repo led to a warning message “The GitHub Webhook could not be created. Please trigger a new build manually.”

Is there a way to diagnose why the webhook cannot be created? Or a way to set it up manually?

[edit]
Raised as https://github.com/canonical-web-and-design/snapcraft.io/issues/3070

1 Like

Yup. Go to github -> Settings -> Webhooks

I know where (and how) to set up a webhook, but just pasting “https://snapcraft.io/mir-kiosk-kodi/webhook/notify” into “Payload URL” gives a 500 response.

I think I need a “secret”, and there’s a choice of content types.

Check your audit log on GitHub. I just ran into the same problem with https://github.com/newsboat/newsboat, and it turned out that build-snapcraft-io removed the hook from my repo a month ago. No warnings, no notifications. Pretty upsetting.

But then, disconnecting and reconnecting the repo worked for me. Could you perhaps try again? Maybe it was a transient error on Snapcraft’s side.

My new hook uses application/json, and it does have a non-empty secret, but I can’t find that secret anywhere in my snapcraft.io settings. So it appears that you can’t actually create the hook manually :frowning:

Where do you find this audit log?

Just tried again with the same result: “The GitHub Webhook could not be created. Please trigger a new build manually.”

It’s under the organization settings: https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/reviewing-the-audit-log-for-your-organization

Apparently there is no such feature for individual repositories :frowning:

Sorry to hear that reconnecting doesn’t work. Hopefully Snap admins will post some ideas regarding this.

As you found, “actor:build-snapcraft-io” removed all the webhooks 29 days ago.

There’s nothing logged about failed attempts to (re)install webhooks though. :man_shrugging:

I commented with what I found on the GitHub issue.