Add a webhook for builds
I think it would be great if poggit would send a POST to a webhook url. For those of us who use Discord, we could setup poggit to send a POST to Zapier, and then Zapier would handle sending it to Discord. It could also be like GitHub where you can have it send everything, send commits, send reviews on Release, etc.
Any specific information you need in such a webhook?
I would guess just general like centralized overview of things on x channel
Build status (Failed, 1 lint error, Passed) and if it failed or had a lint error it should probley include why it failed. It should also include a link to the build, the repo name, and the build number (dev:1, pr:1). Of course, there's a lot more, but this is all I can think of.
And for things like releases getting reviewed, it should include the GitHub name of the reviewer, the review, and what release the review was posted on.
What do you think if we only send commit comments to the repo (see #31) and then you detect the information according to the commit comments? This is still possible, as a commit comment is sent by @poggit-bot if and only if it is a comment related to reviewing. We may have some <!-- {"json":["data","here"]} --> in the comment.
That might work, but I still think proper webhooks should be added.
Proper webhooks will require an additional interface for webhook management, which requires much work. I don't want to unnecessarily reinvent something that we can access already.
i would recon just scrap poggit in a gentle way by whenever a commit is made, send a POST to a handler which would figure out build ID and so on, then proceed to scrap poggit for lint issues then calling the discord webhook, IF there any issues
Webhook management and the relevant security management etc. would indeed be a lot of work. I will keep it to GitHub comments. Also note that there is supposedly a "user timeline" feature, which is a list API for the user's latest notifications, but not webhooks.
Duplicates #31.
Webhooks might be a better choice after all.
Webhooks will be implemented in a way similar to that in Travis-CI. Available actions should include "email", "slack", "gh-comment", "webhook" and "notifico". I don't want to play with crypto stuff, so there may be an internal key storage uploaded to Poggit directly.
Yay!