Since the .git folder isn't versioned for security reasons to execute arbitrary code we have an issue; pre-commit and pre-push hooks won't be there when forked or cloned.
Options
- Rely on
generate.py to create all hooks for us - already implemented
- Might get tricky to merge with additional checks - The pre-commit package has this nice config file. Not sure how that works under the hood, might also be easy
- Rely on pre-commit package and remove git hook definitions from Packager
- Implement the
pre-commit install command somewhere, inside generate_localfiles or make a new method probably coupled to
|
def create_blank_locally(self, install=True): |
- Could add the
generate_localfiles step in .pre-commit-config.yaml as a pre-commit repo perhaps?
I don't want developers to have to write pre-commit install. Everything should go through generate.py - I like it especially because it's very transparent for devs to look through the python code before running the file
Since the
.gitfolder isn't versioned for security reasons to execute arbitrary code we have an issue;pre-commitandpre-pushhooks won't be there when forked or cloned.Options
generate.pyto create all hooks for us - already implementedpre-commit installcommand somewhere, insidegenerate_localfilesor make a new method probably coupled togeneralpackager/generalpackager/packager_files.py
Line 7 in bd361ec
generate_localfilesstep in.pre-commit-config.yamlas a pre-commit repo perhaps?I don't want developers to have to write
pre-commit install. Everything should go throughgenerate.py- I like it especially because it's very transparent for devs to look through the python code before running the file