Skip to content

Commit 54c5641

Browse files
cemililikclaude
andcommitted
fix(hub): CI link audit accepts bare ../learnstack directory link
The follow-up CI fix in 917f7ec used `^(\.\./)+learnstack/` which requires a trailing slash after `learnstack` — bare directory links like `[LearnStack core](../learnstack)` (CONTRIBUTING.md:3) failed the audit: BROKEN: CONTRIBUTING.md → ../learnstack Error: 1 broken relative link(s) in changed Markdown. Relaxed the regex to `^(\.\./)+learnstack(/|$)` so it matches both `../learnstack` (bare root link) and `../learnstack/...` (path into the sibling repo). The boundary is still tight — `../learnstackish/foo` does not match (the regex anchors `learnstack` at a `/` or end-of-string). Smoke-tested locally: ../learnstack → MATCH ../learnstack/foo.md → MATCH ../../../learnstack → MATCH ../../learnstack/ → MATCH ../other → NOMATCH ../learnstackish/foo → NOMATCH Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 917f7ec commit 54c5641

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -205,10 +205,14 @@ jobs:
205205
# - docs/*.md: ../../learnstack/...
206206
# - docs/{architecture,decisions}/*.md: ../../../learnstack/...
207207
# - backend/src/Modules/README.md: ../../../../learnstack/...
208-
# CI cannot reach the sibling repo, so skip the file-existence
209-
# check for any `(../)+learnstack/...` link. The links are
210-
# validated locally on the developer's workstation.
211-
if [[ "$link" =~ ^(\.\./)+learnstack/ ]]; then
208+
# The trailing piece is optional — `../learnstack` (a bare
209+
# directory link to the sibling repo's root) is just as
210+
# legitimate as `../learnstack/docs/...`. CI cannot reach
211+
# the sibling repo, so skip the file-existence check for
212+
# any `(../)+learnstack` link, with or without a trailing
213+
# path. The links are validated locally on the developer's
214+
# workstation.
215+
if [[ "$link" =~ ^(\.\./)+learnstack(/|$) ]]; then
212216
continue
213217
fi
214218
link_path="${link%%#*}"

0 commit comments

Comments
 (0)