Closed a-recknagel closed 4 years ago
I learned by now that git hooks are not a github feature, it's part of git itself. I'll try to work on one that will run the usual suspects: black, pytest (unit only), and mypy. All the other parts of the CI (building the package, building the docs, coverage, bandit, and security) are more stable, would take too much time, or create annoying artifacts.
I researched pre-commit a little, and it might not be a good fit for what I'd like to happen. A valid solution might just consist of writing a shell script that gets dropped into stenotype/scripts
or something and asking people to copy it to .git/hooks/pre-commit
in the CONTRIBUTING guide.
Closing this because I tried and didn't like it.
github supports pre-commit hooks, and black offers an API to be nicely pluggable for them. I haven't dared to touch them yet but it might be nice to have.