-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add pre-commit hook for validating release notes
- This is a pre-commit hook using `pre-commit` framework to validate release notes YAML files. - The hook checks for correct structure, formatting and required fields in the `release-notes` directory. - This ensures consistency in release notes before committing changes. - Added release notes validation to the `make syntax-check` target Ref: #934 (comment)
- Loading branch information
Showing
3 changed files
with
12 additions
and
19 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains 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,9 @@ | ||
repos: | ||
- repo: local | ||
hooks: | ||
- id: syntax-check | ||
name: Syntax Check | ||
entry: make syntax-check | ||
language: system | ||
types: [yaml, json] | ||
files: ^(release-notes/.*\.yml$|streams/.*\.json$|updates/.*\.json$) |
This file contains 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,7 +1,8 @@ | ||
.PHONY: syntax-check | ||
.PHONY: syntax-check print-rollouts | ||
|
||
syntax-check: | ||
@find streams updates -iname '*.json' | sort | xargs -n 1 python3 -c 'import json, sys; json.load(open(sys.argv[1]))' | ||
@find release-notes -iname '*.yml' | sort | xargs -n1 python3 ci/check-release-notes.py | ||
|
||
.PHONY: print-rollouts | ||
print-rollouts: | ||
@find updates -iname '*.json' -printf '%f\n' | cut -f1 -d. | sort | xargs ./rollout.py print |