-
Notifications
You must be signed in to change notification settings - Fork 2
build(ci): add --base/--head changed-files support to validate-frontmatter #2499
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 16 commits into
develop
from
copilot/fix-missing-npm-script-validate-frontmatter-change
Sep 4, 2026
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
9abb726
Initial plan
Copilot 9f882d2
fix: add --base/--head changed-files support to validate-frontmatter.js
Copilot d69b5fe
Merge branch 'develop' into copilot/fix-missing-npm-script-validate-f…
ashleyshaw c6ccb50
Potential fix for pull request finding
ashleyshaw bbfff87
perf: filter changed paths with minimatch instead of full findFiles scan
Copilot f72e944
fix: log err?.stack ?? String(err) in .catch() handlers for actionabl…
Copilot 8bf43b4
Initial plan
Copilot d750690
fix: add --base/--head changed-files support to validate-frontmatter.js
Copilot e31d3dc
Potential fix for pull request finding
ashleyshaw e1d9115
perf: filter changed paths with minimatch instead of full findFiles scan
Copilot 6ed087d
fix: log err?.stack ?? String(err) in .catch() handlers for actionabl…
Copilot 4de0ed1
Merge branch 'develop' into copilot/fix-missing-npm-script-validate-f…
ashleyshaw cc8f3dc
fix: normalize CRLF git diff paths in frontmatter validation
Copilot 6b897c3
Merge branch 'copilot/fix-missing-npm-script-validate-frontmatter-cha…
1dd2eaa
build(ci): remove incidental package-lock.json changes
claude 4005a67
Merge origin/develop into copilot/fix-missing-npm-script-validate-fro…
claude 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
31 changes: 31 additions & 0 deletions
31
scripts/validation/__tests__/validate-frontmatter-changed-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,31 @@ | ||
| jest.mock("child_process", () => ({ | ||
| execFileSync: jest.fn(), | ||
| })); | ||
|
|
||
| const { execFileSync } = require("child_process"); | ||
| const { FileDiscovery } = require("../validate-frontmatter"); | ||
|
|
||
| describe("FileDiscovery.findChangedFiles", () => { | ||
| beforeEach(() => { | ||
| jest.clearAllMocks(); | ||
| }); | ||
|
|
||
| it("trims CRLF-delimited git diff output before filtering changed file paths", () => { | ||
| execFileSync.mockReturnValue( | ||
| "README.md\r\n.github/agents/test.md\r\nnode_modules/pkg/README.md\r\n", | ||
| ); | ||
|
|
||
| const files = FileDiscovery.findChangedFiles( | ||
| "abc123", | ||
| "def456", | ||
| ["**/*.md"], | ||
| ["node_modules/**"], | ||
| "/repo", | ||
| ); | ||
|
|
||
| expect(files).toEqual([ | ||
| "/repo/.github/agents/test.md", | ||
| "/repo/README.md", | ||
| ]); | ||
| }); | ||
| }); |
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.
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.