Skip to content

Claude Code guide in three levels, Beginner to Advanced: hands-on lessons with checked exercises, every volatile fact cited to its source. Independent community guide.

ci: skip npm's website in the external link check, which often blocks bots with 403 (#70)

Wesam Abousaid25f437b90d60
diff --git a/.github/scripts/rules/external-links.mjs b/.github/scripts/rules/external-links.mjs
index 0c0dfab..656f836 100644
--- a/.github/scripts/rules/external-links.mjs
+++ b/.github/scripts/rules/external-links.mjs
@@ -1,11 +1,13 @@
// Links to other sites still resolve. Weekly and scheduled only: other sites
// throttle and flake, so this opens an issue instead of blocking a pull
-// request. A 429 (rate limited) counts as alive.
+// request. A 429 (rate limited) counts as alive. npm's website often answers
+// automated requests, CI runners included, with a 403 bot challenge, so its
+// pages are skipped; the drift rule reads the package from npm's registry.
import { lychee } from './internal-links.mjs';
export const id = 'external-links';
export const modes = ['scheduled'];
export function run(ctx) {
- return lychee(ctx, ['--accept', '100..=103,200..=299,429', '--max-concurrency', '8', '--max-retries', '2']);
+ return lychee(ctx, ['--accept', '100..=103,200..=299,429', '--exclude', '^https://www\\.npmjs\\.com/', '--max-concurrency', '8', '--max-retries', '2']);
}