poggit icon indicating copy to clipboard operation
poggit copied to clipboard

Add a webhook for builds

Open catgirlinspace opened this issue 9 years ago • 13 comments

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.

catgirlinspace avatar Feb 25 '17 00:02 catgirlinspace

Any specific information you need in such a webhook?

SOF3 avatar Feb 25 '17 03:02 SOF3

I would guess just general like centralized overview of things on x channel

Thunder33345 avatar Feb 25 '17 07:02 Thunder33345

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.

catgirlinspace avatar Feb 25 '17 13:02 catgirlinspace

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.

catgirlinspace avatar Feb 25 '17 13:02 catgirlinspace

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.

SOF3 avatar Feb 25 '17 13:02 SOF3

That might work, but I still think proper webhooks should be added.

catgirlinspace avatar Feb 25 '17 16:02 catgirlinspace

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.

SOF3 avatar Feb 25 '17 16:02 SOF3

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

Thunder33345 avatar Feb 25 '17 20:02 Thunder33345

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.

SOF3 avatar Mar 28 '17 04:03 SOF3

Duplicates #31.

SOF3 avatar Mar 28 '17 04:03 SOF3

Webhooks might be a better choice after all.

SOF3 avatar Apr 14 '17 07:04 SOF3

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.

SOF3 avatar Apr 24 '17 16:04 SOF3

Yay!

catgirlinspace avatar Jul 10 '17 23:07 catgirlinspace