-
Notifications
You must be signed in to change notification settings - Fork 213
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 codeowners pre-commit check #3570
Changes from 7 commits
4ba2b67
7331fd6
b27a94d
54c6e2e
32ce97e
66335a6
6b63fdd
6033feb
2567f79
b6b2fbc
2c9de4d
ca3059c
3db8229
4b6117c
b690f67
fd20641
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -138,3 +138,15 @@ repos: | |
- id: renovate-config-validator | ||
args: | ||
- --strict | ||
|
||
- repo: local | ||
hooks: | ||
- id: codeowners-validator | ||
name: CODEOWNERS validator | ||
language: docker_image | ||
pass_filenames: false | ||
files: CODEOWNERS$ | ||
sarayourfriend marked this conversation as resolved.
Show resolved
Hide resolved
|
||
entry: > | ||
-e REPOSITORY_PATH="." | ||
-e CHECKS="files,duppatterns,syntax" | ||
ghcr.io/mszostok/codeowners-validator:v0.7.4 | ||
Comment on lines
+148
to
+151
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. It'd be nice to include the checks for 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. The It's a good check but not currently easily usable. We'd need to add a separate step for it altogether, probably just in CI. I couldn't find an easy way to do that in pre-commit other than adding it with the 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. Thanks for enumerating the quirks of the |
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.
We want to avoid using this
*
all pattern because together with the previous lines it will make require reviews for more people than intended. Please leave the specific lines for the rest of files and folders associated with the@WordPress/openverse-maintainers
group.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.
If we put the all at the top, would the more specific patterns not over-ride them? Or does it just combine them?
If that is the case, then it would indeed be good to add the
notowned
check so we can check that all files are owned, but it adds a lot of complexity to this check because of the reasons I mentioned in my other comments.