Repository navigation
docs(webhooks): document API_CHECK_REQUEST_URL and API_CHECK_REQUEST_METHOD [RED-1432] - #878
Conversation
…METHOD [RED-1432]
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
hlenke
left a comment
There was a problem hiding this comment.
Ready to merge · Every claim I traced matches monorepo main; the three inline comments are optional wording fixes.
CI is green, the PR is mergeable, and main has not touched integrations/alerts/webhooks.mdx since this branch's merge base. #857 also edits this page (the RUN_LOCATION row), but on a different line, so either can land first.
Optional addition, not tied to a line: Test alert channel fills both variables from the example API check, so a test message shows GET https://api.checklyhq.com/v1/runtimes. One sentence saying so would save readers from wondering where that URL came from when they test a template.
Inline: 0 blockers, 0 important, 3 wording.
What I checked
- Read the whole diff (one file, +13/−2) and the full page at the PR head.
gh pr checks 878: all checks pass.gh pr view:MERGEABLE,CLEAN.git log <base>..origin/main -- integrations/alerts/webhooks.mdx: no commits. Overlap: #857 edits the same file on another line.- Source, monorepo
origin/main@1c75808be3(includes the two PRs named in the description):- Webhook alert channel (
apps/backend/api/src/common/services/alert-notification-service/channels/webhook/index.ts): the two variables are set only for API checks and URL monitors and left out for every other check type, so an account or check variable of the same name is used there. In the payload the URL gets its",', backtick, backslash,<and>percent-encoded; in the webhook URL, headers and query values it is inserted as stored. A missing or malformed stored request gives empty strings. - Its tests cover: last URL after a redirect, the percent-encoded
%7B%7BBASE_URL%7D%7D/healthform, HTML escaping with double braces (&,=), triple braces in JSON and Telegram bodies, and other check types leaving the names to account variables. - Go runner (
apps/go-runner/check/api/api.go,secretsscrub.go): after a request error it stores the check's unrendered URL with secrets masked, empty when that URL does not parse; on a setup script failure it stores no request data. Query parameters are kept apart from the URL.{{GROUP_BASE_URL}}is replaced in the backend before the run (apps/backend/api/src/common/helpers/check-settings.ts). platform/variables.mdx#overviewlists the secret scrubbing exceptions the new bullet links to.
- Webhook alert channel (
- Could not verify: that
ALERT_SSLalerts carry no request data and an emptyCHECK_DESCRIPTION. The alert data is built from the check and its run data, and I did not find the SSL expiry path that creates it. The author reports two prod alerts for the main cases. - No end-to-end test: webhook delivery needs a failing check and an alert to be sent, which the local stack does not do on demand. I relied on the source and its unit tests instead.
Co-authored-by: Hannes Lenke <hannes@lenke.at>
Co-authored-by: Hannes Lenke <hannes@lenke.at>
Co-authored-by: Hannes Lenke <hannes@lenke.at>
Affected Components
Notes for the Reviewer
Adds the two webhook variables shipped in https://github.com/checkly/monorepo/pull/6948 and https://github.com/checkly/monorepo/pull/7034 (both on prod): what they hold, when they're empty and how the URL is escaped. Removes the paragraph that said they don't exist.
Part of RED-1432.
Testing