Skip to main content

hookmaster

Project description

Hookmaster

Some nice git hooks for your pleasure.

Problem:

  • You have a policy where every commit message should mention the jira ticket it applies to. You have them in the branch name, and can't be arsed to type them manually to each commit message. Hookmaster provides you with a nice "default" commit message formatter in prepare-commit-msg hook.
  • You want to specify commands to run as different git hooks, in a file you share with your team in git.

Installation

uv tool install hookmaster

Usage

To add 'hookmaster' hooks to all projects under /my/path

hookmaster add /my/path

Now, you get a nice commit message hook that maps branch

/bugfixes/SOMETICKET-123-do-stuff

to

SOMETICKET-123: Do stuff

The hooks themselves relay the call to hookmaster, e.g. prepare-commit-msg hooks created by hookmaster looks like this:

#!/bin/sh
hookmaster prepare-commit-msg "$@"

This delegates the message creation to globally installed hookmaster application. This means fixes to hookmaster benefit all your repositories at once.

githooks.toml

For any other hooks, you can specify them in githooks.toml:

pre-commit = "python tasks.py format"

The format should be obvious.

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

hookmaster-1.4.0.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hookmaster-1.4.0-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file hookmaster-1.4.0.tar.gz.

File metadata

  • Download URL: hookmaster-1.4.0.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for hookmaster-1.4.0.tar.gz
Algorithm Hash digest
SHA256 8b15fa463ac61b8243b94c81b33c773455d87cf293e3d740f88c921dec7f8201
MD5 40f319ff89308424e57aab5cb47f56b2
BLAKE2b-256 17ec514877ba4e1ce210ce5548b3e563733e6452cf6bd9cb38f63e8e8f5b4a7a

See more details on using hashes here.

File details

Details for the file hookmaster-1.4.0-py3-none-any.whl.

File metadata

  • Download URL: hookmaster-1.4.0-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for hookmaster-1.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 78a9e251e7169b56e183728d29100b9dbc69dcdba026e436215c986851925c30
MD5 edb9d689c2550074cba9170659d33352
BLAKE2b-256 37248d85cb111e313ff69aa1a750044d4b4a123683a7903b7e51c1fc5a2dc72c

See more details on using hashes here.

Supported by

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