-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Document generic webhooks #8609
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🤖 Rendered version: https://docs--8609.org.readthedocs.build/en/8609/build-notifications.html |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking we could provide some examples of payloads ready to use for slack & discord, so users just need to copy/paste things.
https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks
https://app.slack.com/block-kit-builder/T02J81RRP
oh, we should also document about the signature check readthedocs.org/readthedocs/builds/tasks.py Line 613 in c99df5d
readthedocs.org/readthedocs/projects/models.py Lines 1593 to 1600 in c99df5d
for example |
I also think this is important 💯 |
I added Slack and Discord examples as suggested 👍🏽 |
Added another section on payload validation, please verify. I don't know if there are any coding standards for this kind of verifications. |
There's a bit of git mess here (merge of merge of merge...) so @stsewd I will let you decide whether to merge this pull request to |
Since this isn't touching anything from the code on the other PR we could also just set the base branch as master, and then merge the two PRs the same day. |
Co-authored-by: Santos Gallegos <[email protected]>
Co-authored-by: Santos Gallegos <[email protected]>
6b66724
to
8f55e27
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll see if I can get some screenshots of the final result of the slack/discord messages. We could merge this when the other PR is merged and update any variables if needed.
683789b
to
fe45d31
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good refactor, but could still use a bit more context. I really feel that having to copy/paste a jumble of JSON to support very common webhooks is a poor product experience, so I'd really like us to see if we can support a nicer workflow there by default with just a button or dropdown Webhook format: Slack, Discord, Custom
or something.
|
||
The project name, slug and its details for the build will be sent as POST request to your webhook URL: | ||
More information on `the Slack Incoming Webhooks documentation <https://api.slack.com/messaging/webhooks>`_. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feels like bad UX. I would strongly suggest that we implement a standard Slack webhook
option, instead of forcing users to copy & paste large bits of JSON into our dashboard. /cc @stsewd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would this be an option to pre-fill the content, or just an option where users don't have control over?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and user would still need to setup webhook from their side on slack/discord.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stsewd I think something that we control should be the default. Many users don't actually want to think about this, and having something that we control and can improve over time without users having to touch it feels like better UX?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the same fashion, imagine that Slack changed their webhook format or something. It would be a huge pain if we had to email every user to ask them to update the blob of JSON in the config. We should definitely support "Slack" as a first-class option that we control the format of.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess if that happens slack will provide users a different url or option, then we are forced to support both formats using an option or something.
My other worry here is if we change something, it will affect everyone, users may not like something from the new change and will request for options, and we end up adding a lot of options in the UI or the users will end up creating their own custom payload at the end.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stsewd Valid concerns, but I think there are a large number of users who just want "Slack notifications" that work well. Asking them to customize them is an actively negative experience. I think we want both the simple & custom, so users can choose what works better for them.
Hi folks, I lost track of the discussion at #8522 and feature proposals that were suggested, too many messages. Is there consensus on the usage already? May I continue working on this? @stsewd @ericholscher |
@astrojuanlu this is it #8522 (comment) |
Ready for another pass! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, with a couple nits 👍
|
||
The project name, slug and its details for the build will be sent as POST request to your webhook URL: | ||
More information on `the Slack Incoming Webhooks documentation <https://api.slack.com/messaging/webhooks>`_. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stsewd Valid concerns, but I think there are a large number of users who just want "Slack notifications" that work well. Asking them to customize them is an actively negative experience. I think we want both the simple & custom, so users can choose what works better for them.
Co-authored-by: Eric Holscher <[email protected]>
] | ||
} | ||
|
||
More information on `the Discord webhooks documentation <https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks>`_. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should maybe start each section with the links to the docs to create the webhhok on slack/discord and then give them the payload to use (Follow this steps on discord/slack, use the given URL when creating a webhook on rtd and add this payload).
This has been approved already three times, and I keep having to catch up with the |
Co-authored-by: Santos Gallegos <[email protected]>
Continuation of #8522.
I considered renaming the file from
build-notifications
tobuild-notifications-webhooks
, but was unsure if it was worth it. I ended up renaming the title though.