Repository navigation
docs(scripts): correct Get-ChangedTestFiles.ps1 usage in tests README - #3230
Mohammed Alkindi (MohammedAlkindi) wants to merge 2 commits into
Conversation
BaseBranch has no default and the script throws without it, so the no-argument example failed. Document the required parameter, the origin/ prefix, the remaining defaults and the HAS_CHANGES and TEST_PATHS outputs.
There was a problem hiding this comment.
Hi Mohammed Alkindi (@MohammedAlkindi), thank you for this contribution and for all the fixes you've been sending lately. They're much appreciated! Before we continue with the review, could you please take care of a few process items:
1. Complete all required checks
The Required Local Checks in the description are still unchecked. Please run these locally, fix anything they report, and tick each box once it passes (or mark it N/A with a short reason):
npm run validate:localnpm run validate:docs(if docs changed)npm run spell-checknpm run lint:md-links
Please also go through the remaining Required Checks and Security Considerations items so every box is either checked or explicitly marked N/A.
2. Link an issue
This PR doesn't reference an issue yet. Please check whether one already exists for this problem. If not, please create one using the appropriate issue template. Then add it under Related Issue(s) with a closing keyword (for example Fixes #1234) so it is closed automatically on merge.
Thanks again! I'm happy to take another look as soon as these are in place.
Bill Berry (WilliamBerryiii)
left a comment
There was a problem hiding this comment.
Thank you for correcting the BaseBranch requirement and expanding the parameter and output reference. I am requesting changes for two documentation contracts that can still mislead callers: the relative root defaults depend on the caller's working directory, and the named outputs are published only in supported CI environments. Please also reconcile the required checklist items and add the exact validation commands and concise results to the PR description.
| directly; changes are diffed against `origin/<BaseBranch>`) | ||
| * `-FileFilter` - Glob patterns for filtering changed files (defaults to | ||
| `*.ps1`, `*.psm1`) | ||
| * `-SkillsRoot` - Root path for skill scripts (defaults to `.github/skills`) |
There was a problem hiding this comment.
Thank you for documenting these defaults. Both relative paths are resolved from the caller's current working directory, so invoking the script from outside the repository root can silently miss matching tests. Please state that the examples must run from the repository root, document the resolution rule, or change the implementation to resolve the defaults from a stable repository path.
|
|
||
| #### Outputs | ||
|
|
||
| When run directly, the script publishes its results through `Set-CIEnv`: |
There was a problem hiding this comment.
Set-CIEnv does not create these named values during ordinary local execution; its local branch only emits a verbose message. Please qualify this as supported-CI behavior and describe what local callers can observe, or add a separate local output contract.
Path resolution is relative to the caller's working directory rather than the script, and Set-CIEnv publishes HAS_CHANGES and TEST_PATHS only on a direct run in a supported CI environment.
|
Both review notes on |
Pull Request
Description
The tests README says
-BaseBranchdefaults tomain, but the script has no default, so the no-argument example throws. Marks-BaseBranchrequired, lists the other defaults and theHAS_CHANGESandTEST_PATHSoutputs, and uses-BaseBranch mainin the example.Related Issue(s)
None.
Type of Change
Sample Prompts (for AI Artifact Contributions)
N/A
Testing
The old example threw under pwsh 7. markdownlint-cli2, cspell,
Format-MarkdownTables.ps1 -CheckandValidate-MarkdownFrontmatter.ps1pass on the changed file.Checklist
Required Checks
AI Artifact Contributions
N/A
Required Local Checks
npm run validate:localnpm run validate:docsnpm run spell-checknpm run lint:md-linksSecurity Considerations
Additional Notes
None.