-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add pre-commit hook for validating release notes #937
Open
aaradhak
wants to merge
6
commits into
coreos:main
Choose a base branch
from
aaradhak:precommit
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 3 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
3d00f48
Add pre-commit hook for validating release notes
aaradhak 7d172f4
DRopping pre-commit-check
aaradhak 1c7fb50
Reove pre-commit
aaradhak 2fa8c00
pre-commit-config changed to use syntax check
aaradhak 865a80d
Added a new blank line
aaradhak e4c16a9
Removed validate-release-notes github workflow
aaradhak File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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,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$ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How about now we make this config use |
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,7 @@ | ||
.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]))' | ||
|
||
.PHONY: print-rollouts | ||
@find release-notes -iname '*.yaml' | sort | xargs -n1 python3 ci/check-release-notes.py | ||
print-rollouts: | ||
@find updates -iname '*.json' -printf '%f\n' | cut -f1 -d. | sort | xargs ./rollout.py print | ||
aaradhak marked this conversation as resolved.
Show resolved
Hide resolved
|
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's using this file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This yaml is used by the pre-commit tool framework for managing pre-commit hooks. Pre-commit hooks run automatically before a commit is finalized. It requires the installation of pre-commit tool in the local environment