[ -n "${SLACK_WEBHOOK}" ] || { echo "::error::DOCS_LINK_SLACK_WEBHOOK is not set"; exit 1; }
# -f: a revoked or misconfigured webhook must fail the step, not log success.
curl \
-fsS \
--max-time 10 \
--retry 3 \
--retry-all-errors \
-X POST \
-H 'Content-type: application/json' \
-d '{"text":":warning: *Docs URL drift detected by audit-docs-paths.*\n'"${COUNT}"' stale docs path reference(s) resolve to a redirect source. See the run: '"${RUN_URL}"'"}' \
echo "The scheduled \`audit-docs-paths\` workflow found **${COUNT}** stale docs path reference(s) that resolve to a redirect source in \`coder/coder.com/redirects.json\`. Each should be updated to the redirect's destination."
echo
echo "- Latest run: ${RUN_URL}"
echo "- Full report: the \`audit-docs-paths-report\` artifact on that run."
echo
echo "<details><summary>Report</summary>"
echo
# Cap the embedded report to stay under GitHub's ~65k issue
# body limit; the full report is always in the artifact.