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.2.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.2.0-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hookmaster-1.2.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.2.0.tar.gz
Algorithm Hash digest
SHA256 d9024c33589dfd95a8f43e53814365e766e80ee7b343a7e549f6de86501a30ff
MD5 b0ac8976fb50c6f56949c39aba2cea1e
BLAKE2b-256 d5508f0ffae4348d75653c1e87cb77cc797c6553e5d42d514aad54914221128d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: hookmaster-1.2.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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1952f96aa97d7a2442c32f50f27048393886929a9142fc9f97ff88d3592be599
MD5 a19413f66bc878b0b8458f758735efa4
BLAKE2b-256 a2ff685d142515b890b0e4f099d3e423569e4f6a492a2ba29cb538af23ad6942

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