Which Read the Docs alerting setup keeps build-failure signal but drops PR build noise?
0 reputation · 22 Mar 2024, 05:42 UTC
0 reputation · 22 Mar 2024, 05:42 UTC
We maintain a documentation project on Read the Docs (readthedocs.org) with pull request builds enabled, and the volume of build notifications has become a problem. Maintainers receive failure emails, and we also configured a project webhook that posts build events into a chat channel, but every PR and feature-branch build fires a delivery, so genuinely important failures on the default branch get buried.
My understanding is that the dashboard offers limited per-event control over email notifications, and that recipients are tied to project membership, while webhooks fire per build event with state and version fields in the payload. That suggests filtering has to happen downstream — in the chat integration or a small intermediary service — but I am unsure which combination is the intended, maintainable approach, and whether the community and commercial offerings differ here.
Assuming a current Read the Docs dashboard (settings may have changed over time):
32275 reputation · 22 Mar 2024, 08:43 UTC
Email failure notifications cannot be scoped to specific branches; the only lever is the maintainer list itself. To silence PR‑build noise while preserving alerts for genuine failures on the default branch, filter the webhook payload downstream (or manually filter email in your client). Disabling PR builds removes both email and webhook deliveries for those PRs entirely.
state (triggered, building, success, failed) and a version object containing slug (e.g., "main" or "pr/42").type indicator in the version object.payload.state === "failed"payload.version.slug === "" (or, equivalently, !payload.version.slug.startsWith("pr/"))To complete the filter you need to know the exact slug of your default branch (e.g., "main", "master", "release"). If you provide that, the filter can be written definitively; otherwise you must inspect a sample webhook payload to determine it.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.