Improve GitHub webhooks with new event types
GitHub added a bunch of new events to the webhook payloads over the past year, Discord does sadly not support (properly) yet. Additionally, GitHub overhauled the way how stuff is displayed much. I think it would be a great improvement for the many open source developers on Discord, to see updated webhooks in their channels.
I've taken the time to go thru each event on the "Webhooks" page of a repository to check out out how Discord handles embeds. Entries that are not listed below are handled properly by Discord (in my opinion!).
- Branch protection rules status updates are not sent at all. The payload has an "action" field to display edited, added or removed. The embed could use yellow, green or red (like it does in other locations), depending on the action performed. Additionally, the embed could list the changes performed too, considering the payload does deliver that kind of data.
- Collaborator add, remove, or changed status updates are just send for additions. Removing collaborators does send no embed.
- Labels created, edited or removed are not sent at all. The same procedure from branch protection rules could be applied here, just without the last part.
- Milestones created, edited or removed are not sent at all. The same procedure from protection rules can be applied here.
- Projects do send no embed at the moment. Similar to discussions, they could display the name and the description of the created or closed project, with the respectively chosen colors.
- Project columns do send no embed at the moment. The embed could contain the link of the column created while linking to the project.
- Project cards do send no embed at the moment. The embed could look similar to an issue comment embed, displaying its content while linking to the issue card on the project.
-
Pull requests: GitHub does now differentiate between the type of review-submitter. If you approve a PR that targets a branch you don't have write access to, GitHub displays your approval gray instead of green. The same applies to requesting changes. If you have no write access, you can't "request changes" anymore, the wording has been changed to "... suggested changes".
It would be handy, if Discord can respect the change as well and display reviews from people without write access not red or green and preserve these colors for people with write access. To comply with GitHub's colors, these could use the default embed color.
Similar scenario applies to draft PRs. If someone raises a draft PR, the embed should be gray, like on GitHub and turns green (in a resend embed) if the draft PR has been marked as ready for review. - Wiki page updates are not sent at all. Wikis are an own repository with a commit history, therefore updates could be displayed in the same way how push commits are displayed, just with a different title of course.
Thanks for your time and considering it!
4
Iniciar sesión para dejar un comentario.
Comentarios
0 comentarios