Skip to main content

Create git hooks with ease using a simple configuration file in a git project

Project description

python-githooks

code linting: flake8 code quality: pytest MIT license

Create git hooks with ease using a simple configuration file in a git project

Install

pip install python-githooks

Usage

  1. Create a .githooks.ini configuration file(If not provided a dummy configuration file will be created).
  2. Add sections based on git hooks names followed by a command property with the shell code you want to run.
  3. Run either python -m python_githooks or githooks in you virtual environment.
  • Configuration file Example:
[pre-commit]
command = pytest --cov

[pre-push]
command = pytest --cov && flake8

License

python-githooks is MIT-licensed.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python-githooks-1.0.1.tar.gz (2.7 kB view hashes)

Uploaded Source

Built Distribution

python_githooks-1.0.1-py3-none-any.whl (4.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page