Skip to content

ci: notify Slack when audit-docs-paths finds docs URL drift - #27924

Draft
nickvigilante wants to merge 2 commits into
vigilante/docs-366-wire-audit-docs-pathsmjs-to-run-on-a-github-actions-cronfrom
vigilante/docs-617-send-a-slack-notification-when-audit-docs-paths-finds-drift
Draft

ci: notify Slack when audit-docs-paths finds docs URL drift#27924
nickvigilante wants to merge 2 commits into
vigilante/docs-366-wire-audit-docs-pathsmjs-to-run-on-a-github-actions-cronfrom
vigilante/docs-617-send-a-slack-notification-when-audit-docs-paths-finds-drift

Conversation

@nickvigilante

Copy link
Copy Markdown
Contributor

What

Adds a Send Slack notification on drift step 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-paths workflow (#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 embedded audit-docs-paths job that #27245 removes from weekly-docs.yaml already posted to Slack, so this also restores that notification in the new workflow.

How

  • New step placed after the tracked-issue step and before Fail the run when findings exist.
  • Gated on 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.
  • Reuses the existing secrets.DOCS_LINK_SLACK_WEBHOOK (the same docs webhook weekly-docs.yaml uses for the dead-link check) — no new secret or channel.
  • Message includes the finding count and a link to the run; the tracked issue and full report are reachable from there.
  • Notifications turn on together with the audit, since the whole job stays gated behind 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 to main once #27245 merges.

Validation

  • actionlint -shellcheck= -ignore set-output passes on the changed workflow.
  • Verified the Slack JSON payload is well-formed (valid JSON, correct rendering) with a sample count and run URL.

Linear: https://linear.app/codercom/issue/DOCS-617

This PR was created with AI assistance (Coder Agents).

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).
@linear-code

linear-code Bot commented Aug 6, 2026

Copy link
Copy Markdown

DOCS-617

@nickvigilante
nickvigilante force-pushed the vigilante/docs-366-wire-audit-docs-pathsmjs-to-run-on-a-github-actions-cron branch from 1fead48 to d5ba3cd Compare August 6, 2026 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant