Skip to main content

Checks if commit message matches supplied regex

Project description

commit-msg-regex-hook

Before the readme, big shoutout to @dimaka-wix who's repo commit-msg-hook was the basis for this repository. Go check out his repo for more information.

This hook is designed to be used with the pre-commit hook framework. It will check your commit string against the provided regex.

Utilizing

First you will need to setup pre-commit using their documentation. Then you will be able to add this repository under it with the following:

- repo: https://github.com/dimaka-wix/commit-msg-hook.git
  rev: v0.3.1
  hooks:
    - id: commit-msg-hook
      args: ["regex='[A-Z]{3,4}-[0-9]{3,6} \| [\w\s]* \| .+'"]
      stages: [commit-msg]

To enable commit-msg hook with pre-commit run:

pre-commit install --hook-type commit-msg

Update to the latest release (optional)

pre-commit autoupdate --repo https://github.com/dtaivpp/commit-msg-regex-hook.git

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

commit-msg-regex-hook-0.0.1.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

commit_msg_regex_hook-0.0.1-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file commit-msg-regex-hook-0.0.1.tar.gz.

File metadata

  • Download URL: commit-msg-regex-hook-0.0.1.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.0

File hashes

Hashes for commit-msg-regex-hook-0.0.1.tar.gz
Algorithm Hash digest
SHA256 08f30e7c7c5995cccb9d4f44fff1badefeb3bdf10690b9470c0e7c47ff6b161a
MD5 36a84f75ab2cc4ff28ea10522ebcf175
BLAKE2b-256 2d8a36240530589f70cd04b4029d34e44dcfed5284e45c8f025f01c6d1400226

See more details on using hashes here.

File details

Details for the file commit_msg_regex_hook-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: commit_msg_regex_hook-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.0

File hashes

Hashes for commit_msg_regex_hook-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c7e5cb135abc735e81dc50717e1cfecc53d63a07d2b0743f11dee808cc825c03
MD5 206c5b00d259aac2093f631cca7b237a
BLAKE2b-256 91f96c830ba8985092f656cd41c22c206c041110b31dbdfa8311b21e16e7eda6

See more details on using hashes here.

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