[](https://pypi.python.org/pypi/flowtool-githooks) [](https://pypi.python.org/pypi/flowtool-githooks) [](https://pypi.python.org/pypi/flowtool-githooks)
flowtool-githooks
Some functionality to use granular git hooks.
The main concept behind flowtool-githooks is, that instead of running one single hook script the package will ‘run’ a directory instead. The directory will be created right next to where the hook is in .git/hooks and it has the name of the hook plus .d. So for example the directory for the pre-commit hook is .git/hooks/pre-commit.d right next to the hook script: .git/hooks/pre-commit
flowtool-githooks ships the runner script and adds some commands to manage the content of the hook directories.
Scripts inside the hooks directory, .git/hooks/pre-commit.d and .git/hooks/commit-msg.d currently, are only executed, if the are executable. This is an old way of activating and deactivating the scripts by the management command.
## Installation
Currently the flowtool-githooks package contains only the runner and the management commands. To get some pre configured hooks check the [flowtool-githooks-demo](https://github.com/isnok/py-flowlib/tree/master/hooks-demo) package, and (for python-related hooks) [flowtool-python](https://github.com/isnok/py-flowlib/tree/master/pythonic).
Once you have flowtool-githooks and it’s requirements installed, you can run
`shell flowtool githooks-install # install the runner (asks before overwriting anything) `
from inside a git repository to install the hooks. When they are installed, they can be configred interactively by running
`shell flowtool githooks-config # interactively configure git hooks (needs other hook-pkgs also) `
And you can also just get the status of githooks in the current repo:
`shell flowtool githooks-status `
## Custom hook scripts
Currently it is better supported to create symlinks in the hook directory. To introduce arbitrary scripts/executables as git hooks use the command:
`shell $ flowtool githooks-introduce --hook <hook_name> /path/to/file $ flowtool githooks-introduce --help # might be helpful as well `
## More to come
There is also a small library of “discovery functions” contained in this package. It is used by some hook scripts to find files to take care of.
Metadata
Release files for flowtool-githooks 0.7.46
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| flowtool_githooks-0.7.46-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Release files / flowtool_githooks-0.7.46-py2.py3-none-any.whl
| Download URL | flowtool_githooks-0.7.46-py2.py3-none-any.whl |
|---|---|
| Size | 32.8 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
d9cb6e30b885b3d961eba9dc40da85284b83931838e804ac7311c23d0dcd606e
|
|
BLAKE2b-256 checksum How to use checksums |
86f8d2f237f568b050f9d5ab19571b29226e3e131cda4fdc7f83beceb9d6de42
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for flowtool-githooks 0.7.46
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.