Repository navigation
fix(action): run every validated check, whatever separates the names - #109
Merged
Merged
Conversation
The setup step split `checks` on any whitespace, but each check step looked for the name between literal spaces in the raw input. A list written one name per line, separated by tabs, or left empty therefore passed validation and ran no checks at all, and the job went green. The setup step now normalizes the names into a space-separated output that the check steps read, fails when nothing is selected, disables globbing while it splits, and rejects an invalid audit-fail-on even when audit is not selected. The Action self-test gains a one-name-per-line case against the broken fixture and an empty-list case, both of which must fail. Unit tests run the real setup script with bash. Closes #104 Co-Authored-By: Claude Opus 5.5 <[email protected]>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Reader problem and change
An adopter who wrote
checksone name per line, the way the same action'sexcludeinput is written, got a green job in which no check ran. The same happened with tabs or an empty value. The setup step validated names split on any whitespace, while each check step looked for' audit 'with literal spaces in the raw input.checksoutput, and the three check steps read that output.audit-fail-onnow fails even whenauditis not selected. Before, it was silently ignored.checksandaudit-fail-onrows inguides/adopting-the-checks.md, the input description inaction.yml, and the changelog.Closes #104
Evidence
Before: the old conditions (
contains(format(' {0} ', inputs.checks), ' audit ')) can't match"audit\ndocs-links\n", so all three steps were skipped.The new unit tests run the action's real setup script with bash. Against the old
action.ymlthey fail 11 times:audit-fail-onpasses.Against the new one they pass.
Verification
quality.ymlgains two negative cases: a one-name-per-line list against the broken fixture, andchecks: ' '. CI on this PR is the first live-runner run of both.Limitations
checks: ''may be replaced by the input's default by the runner rather than reaching the script. That case was not observed on a live runner, so the self-test uses' '.pathvalues in error annotations are unchanged. They come from the caller's own workflow.🤖 Generated with Claude Code