-
Notifications
You must be signed in to change notification settings - Fork 2
build(ci): scope docs validators to changed files and harden file-list handling #2504
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
ashleyshaw
merged 22 commits into
develop
from
copilot/fix-mermaid-accessibility-readme-validation
Sep 3, 2026
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
8f417d5
Initial plan
Copilot ca9a3bd
fix: scope README and Mermaid validation to changed files
Copilot f876351
fix: harden docs validation file-list handling
Copilot 5c6fab0
fix: tighten mermaid target filtering and test cleanup
Copilot f58461a
fix: restrict mermaid validators to markdown inputs
Copilot 83a02d9
test: cover frontmatter target-files guard clauses
Copilot 73dad3d
Merge branch 'develop' into copilot/fix-mermaid-accessibility-readme-…
ashleyshaw 6b629a7
Potential fix for pull request finding
ashleyshaw 09d3919
fix: match vendor paths at repo root in colour-contrast validator
Copilot 53b4921
Initial plan
Copilot 5271f63
fix: scope README and Mermaid validation to changed files
Copilot ff2d80f
fix: harden docs validation file-list handling
Copilot e9c6380
fix: tighten mermaid target filtering and test cleanup
Copilot 66bc288
fix: restrict mermaid validators to markdown inputs
Copilot ae3d0ec
test: cover frontmatter target-files guard clauses
Copilot c311d33
Potential fix for pull request finding
ashleyshaw 19c8e2e
fix: match vendor paths at repo root in colour-contrast validator
Copilot 34d144b
chore: add missing npm scripts for workflow validation
ashleyshaw 64d2c40
fix: resolve npm ci compatibility and linting issues
ashleyshaw cae29d9
Merge branch 'develop' into copilot/fix-mermaid-accessibility-readme-…
ashleyshaw de45a02
Merge branch 'copilot/fix-mermaid-accessibility-readme-validation' of…
5d62122
Merge branch 'develop' into copilot/fix-mermaid-accessibility-readme-…
ashleyshaw File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| #!/usr/bin/env node | ||
| /* global fetch */ | ||
|
|
||
| /** | ||
| * distribute-unallocated-milestones.js | ||
|
|
||
37 changes: 37 additions & 0 deletions
37
scripts/validation/__tests__/validate-frontmatter-target-files.test.js
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| const fs = require("fs"); | ||
| const os = require("os"); | ||
| const path = require("path"); | ||
|
|
||
| const { resolveCliTargetFiles } = require("../validate-frontmatter.js"); | ||
|
|
||
| describe("resolveCliTargetFiles", () => { | ||
| let tmpRoot; | ||
|
|
||
| afterEach(() => { | ||
| if (tmpRoot) { | ||
| fs.rmSync(tmpRoot, { recursive: true, force: true }); | ||
| tmpRoot = null; | ||
| } | ||
| }); | ||
|
|
||
| it("resolves relative files, de-duplicates, and skips missing files", () => { | ||
| tmpRoot = fs.mkdtempSync(path.join(os.tmpdir(), "frontmatter-targets-")); | ||
| const existing = path.join(tmpRoot, "README.md"); | ||
| fs.writeFileSync(existing, "# test"); | ||
|
|
||
| const result = resolveCliTargetFiles( | ||
| ["README.md", existing, "missing.md"], | ||
| tmpRoot, | ||
| ); | ||
|
|
||
| expect(result).toEqual([existing]); | ||
| }); | ||
|
|
||
| it("returns empty array when fileArgs is not an array", () => { | ||
| expect(resolveCliTargetFiles(null, "/tmp")).toEqual([]); | ||
| }); | ||
|
|
||
| it("returns empty array for an empty file list", () => { | ||
| expect(resolveCliTargetFiles([], "/tmp")).toEqual([]); | ||
| }); | ||
| }); |
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.