You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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
The text was updated successfully, but these errors were encountered:
Might not be such a good idea to have generate.py to setup the dev environment, because it would require generalpackager to be installed.
Although I guess generalpackager could be put in every repos [dev] dependencies. Having circular dependency through the optional [dev] might be fine. These dev deps should be ignored by the mermaid graph too
generate.py is just something I made because I got tired of generating the workflow by hand, then it turned out to be pretty useful to keep git hooks in sync as well. Also nice to make sure the readme has been generated properly
It's basically what happens in the sync stage of the workflow as well. Running it once will enable the pre-push hook to run it automatically, but only important (non-aesthetic) files
To summarize, generate_localfiles is used in a few places:
Manually by generate.py
In the pre push hook to halt if any non-aesthetic file was changed
In the CI unittest step (Might not be needed)
In the CI sync stage
The linting should probably be included in all of these places
Since the
.git
folder isn't versioned for security reasons to execute arbitrary code we have an issue;pre-commit
andpre-push
hooks won't be there when forked or cloned.Options
generate.py
to create all hooks for us - already implementedpre-commit install
command somewhere, insidegenerate_localfiles
or make a new method probably coupled togeneralpackager/generalpackager/packager_files.py
Line 7 in bd361ec
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 throughgenerate.py
- I like it especially because it's very transparent for devs to look through the python code before running the fileThe text was updated successfully, but these errors were encountered: