-
Notifications
You must be signed in to change notification settings - Fork 19
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
feat: add pre-commit hooks #798
Conversation
5eeee6a
to
2073ea4
Compare
2073ea4
to
d517cc9
Compare
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.
How are we expecting this to be used? Is it something that would be enabled for everyone in a given Kayobe config, or opted into per-person?
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.
It would be nice to provide some simple docs on this in the contributor guide.
I think having it is as an opt-in at least within SKC it the sensible move. If individual engineers want to enable it within their own checkout of the site config they can do and in situations where their is a single checkout shared enabling it would a group decision. |
d517cc9
to
686e5e4
Compare
1a61c81
to
2746b8f
Compare
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.
My one lingering concern is that false positives could break things but they can be skipped with --no-verify so I think the benefits outweigh the risks
eb12139
to
8355d55
Compare
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.
Actually perhaps this should go to antelope only?
@jackhodgkiss should we get this merged? I'm happy to rebase it on antelope for you if you're busy |
7eb0dcf
to
5e7a63a
Compare
Initally `pre-commit` hooks were installed due the presense of a hook for `control host bootstrap` and when `enable_pre_commit_hooks` was set to `true`. However now `pre-commit` hooks are only installed when the hook is present or the playbook is called, no requirement for an `Ansible` conditional to be true.
5e7a63a
to
54766db
Compare
Add a simple playbook that can install pre-commits and register a few simple hooks. This process is implemented as a hook that will run post control host bootstrap.
Note: this is currently configured as an opt-in feature and will only install and register hooks if
enable_pre_commit_hooks
is set totrue
ininstall-pre-commit-hooks.yml