Repository navigation
Schema Validation: show failures as annotations and a job summary - #3544
Merged
julianwood merged 1 commit intoNov 15, 2026
Merged
Conversation
In GitHub Actions, validate.js now prints each problem as an ::error workflow command (pattern file and folder problems on example-pattern.json, IAM findings on the template file and line) and appends a summary table to GITHUB_STEP_SUMMARY. Local runs and the GH_AUTOMATION comment path are unchanged.
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.
When Schema Validation fails, the run only shows a red cross. The reasons are buried in the job log, so contributors have to open it to find out what to fix.
This change makes
_scripts/validate.jsreport each problem in two places when it runs in GitHub Actions:::errorannotation. Pattern file and folder problems point at the pattern'sexample-pattern.json. Broad IAM findings point at the template file and line. Annotations show on the run page and, for files in the diff, on the Files changed tab.Messages are escaped the way workflow commands expect (
%, CR and LF in the message, plus:and,in properties).What stays the same: the workflow file, its
contents: readpermission andGH_AUTOMATION: false. The script still posts no comments in this workflow. Local runs print the same output as before, and theGH_AUTOMATION=truecomment and label path is unchanged.check-iam.jsgainsfindPatternIam, which returns each finding's file and line.checkPatternIamreturns the same strings as before.Tests:
node --test _scripts/annotate.test.jscovers the escaping, the annotation format and the summary. I also ran the script withGITHUB_ACTIONS=trueon a passing pattern and on a temporary broken copy (missingtitle, a badlanguage, anAction: "*"grant, a flat folder):