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.2.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: commit-msg-regex-hook-0.0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 b28e752448e35333b00799af96d5f60a294afa30081ce59dbf6eca5126975aba
MD5 c9c6c403a9276f8292dae09f46baeaac
BLAKE2b-256 b751c94879501fed49049ba7e45849a45e5e50add190a0bbcd87bd2df12a9429

See more details on using hashes here.

File details

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

File metadata

  • Download URL: commit_msg_regex_hook-0.0.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c2f3d9fa30611c854d4b8ec5af26f2db9ff95df605126199e3f70c1c499d576b
MD5 a081ca2888a630b70747b78a75e6ce4a
BLAKE2b-256 0dc47193a8a35df223123a300dffb2e2e7b75a4eceddd0bf6d41d12862dba75e

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