diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..895d871 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,8 @@ +repos: +- repo: local + hooks: + - id: validate-release-notes + name: Validate Release Notes + entry: python ci/check-release-notes.py + language: python + files: ^release-notes/.*\.yml$ diff --git a/Makefile b/Makefile index 90b2d76..e2c510e 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,8 @@ -.PHONY: syntax-check +.PHONY: syntax-check pre-commit-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]))' + @python ci/check-release-notes.py release-notes/*.yml -.PHONY: print-rollouts print-rollouts: @find updates -iname '*.json' -printf '%f\n' | cut -f1 -d. | sort | xargs ./rollout.py print