Validate the format of a commit message to Wikimedia Gerrit standards
Project description
commit-message-validator is a tool that validates git commit messages to the Wikimedia commit message guidelines.
Please see <https://www.mediawiki.org/wiki/commit-message-validator> for more details.
Usage
Use locally as a Pre-commit plugin
commit-message-validator can be used as a plugin for the pre-commit git hooks system. Add the following to your .pre-commit-config.yaml:
- repo: https://gitlab.wikimedia.org/repos/ci-tools/commit-message-validator
rev: # Fill in a tag / sha here (like v2.0.0)
hooks:
- id: commit-message-validator
Then install the pre-commit hook:
pre-commit install --hook-type commit-msg
Use with gitlab.wikimedia.org’s CI/CD
A GitLab CI/CD template is provided in this repo for linting of commit messages in a merge request. Add the following to your .gitlab-ci.yml:
include:
- project: repos/ci-tools/commit-message-validator
file: /templates/lint-merge-request.yml
Contributing
See CONTRIBUTING.rst for guidelines on contributing to commit-message-validator.
Bug reports
Please reports bugs and feature requests at https://phabricator.wikimedia.org/tag/commit-message-validator/.
License
Licensed under the GPL-2.0-or-later license. See COPYING for the full license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for commit_message_validator-2.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1b52546c264b69e7988f53de2bf387ca5e0261b152c4700738633998a16da5fb |
|
MD5 | 39ba7280f6bc0f4968b52ddeaa9b8123 |
|
BLAKE2b-256 | 34bb82d6fb165dca031537ffebf1797c6e38313c76e3f3f9dfa70ade580155a9 |
Hashes for commit_message_validator-2.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dbab37b7937521faa20fb666aaee0680f350db35e05d04e6fea38a74a3a30ac5 |
|
MD5 | e5559289a858335261284c89a7716d45 |
|
BLAKE2b-256 | 607b2eb43669d397df4c36c9fc60ef8f82d679162d63a9cec6b6bf925a2f29de |