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

Uploaded Python 3

File details

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

File metadata

  • Download URL: hookmaster-1.3.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.3.0.tar.gz
Algorithm Hash digest
SHA256 106911f5fb6382203ea30afc4372ca890ddba55b687c086a5116d2ef5fc881cd
MD5 4c2e6c1f9f78f4f2c59d306abf2f9204
BLAKE2b-256 6ae371034743abb460924426a2bc3ce398c3a0fee29435ad16e4eff1b4a983ef

See more details on using hashes here.

File details

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

File metadata

  • Download URL: hookmaster-1.3.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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3b39fcd30b565589fb0a57746cb1c882b0fbddeeef7070068680a7ed23e5a6d7
MD5 9f65b5057539283f6a68153c549599e4
BLAKE2b-256 57d73bca01232c7a845e43e4d61ce14ae3fdece53058fe59fbf491b7df22a14f

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