ci: notify Slack when audit-docs-paths finds docs URL drift - #27924
Conversation
cdrci2 is not a collaborator on coder/coder.com, so its token cannot read the repo. cdrci is a coder.com collaborator, and its token (secrets.CDRCI_GITHUB_TOKEN) is already used for cross-repo checkouts in release.yaml/tag-and-release.yaml, so use that for the coder.com checkout. Ref: DOCS-366
The scheduled audit-docs-paths workflow (#27245) surfaces docs URL drift only through a tracked issue, a red check, and an artifact, none of which actively notify anyone. Add a Slack step that posts to the docs webhook (secrets.DOCS_LINK_SLACK_WEBHOOK, the same one weekly-docs.yaml uses for the dead-link check) when the audit finds drift. The step is gated on the finding count and runs before the failing step, so it fires only on findings > 0; clean runs and audit errors stay silent, and it turns on with the job via AUDIT_DOCS_PATHS_ENABLED. This restores the Slack notification the embedded audit-docs-paths job had before the dedicated workflow superseded it. Ref: DOCS-617 > This PR was created with AI assistance (Coder Agents).
nickvigilante
force-pushed
the
vigilante/docs-366-wire-audit-docs-pathsmjs-to-run-on-a-github-actions-cron
branch
from
August 6, 2026 17:46
1fead48 to
d5ba3cd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a
Send Slack notification on driftstep to.github/workflows/audit-docs-paths.yaml, so when the scheduled audit finds docs URL drift it pings the docs team in Slack, on top of the existing tracked issue + red check + report artifact.Why
The dedicated
audit-docs-pathsworkflow (#27245) surfaces drift only through a tracked GitHub issue, a failing check, and an uploaded report. None of those actively notify anyone, so drift can sit unseen unless someone is watching repo issues. The embeddedaudit-docs-pathsjob that #27245 removes fromweekly-docs.yamlalready posted to Slack, so this also restores that notification in the new workflow.How
Fail the run when findings exist.steps.audit.outputs.count(the same guard as the failing step), so it fires only on findings > 0 — clean runs and audit errors stay silent.secrets.DOCS_LINK_SLACK_WEBHOOK(the same docs webhookweekly-docs.yamluses for the dead-link check) — no new secret or channel.vars.AUDIT_DOCS_PATHS_ENABLED.Stacking
Stacked on #27245 (base branch
vigilante/docs-366-wire-audit-docs-pathsmjs-to-run-on-a-github-actions-cron). I'll re-target this PR tomainonce #27245 merges.Validation
actionlint -shellcheck= -ignore set-outputpasses on the changed workflow.Linear: https://linear.app/codercom/issue/DOCS-617