Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

commit_message_validator-3.0.0.tar.gz (27.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

commit_message_validator-3.0.0-py3-none-any.whl (26.2 kB view details)

Uploaded Python 3

File details

Details for the file commit_message_validator-3.0.0.tar.gz.

File metadata

  • Download URL: commit_message_validator-3.0.0.tar.gz
  • Upload date:
  • Size: 27.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for commit_message_validator-3.0.0.tar.gz
Algorithm Hash digest
SHA256 a0f673697ca62f833e09e2f9630d2461e898a9f9baf0543b35de8603a0508b21
MD5 53921cd59e7cea23c7b625c2a45cea2d
BLAKE2b-256 ed455a3d5dcf61702badc30189f9ac4fbf5e302bcf7727570d50651560a03cdb

See more details on using hashes here.

File details

Details for the file commit_message_validator-3.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for commit_message_validator-3.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9ab3d6b305b047187ea92bdfc0a2dafc10135362dcaf97c974617332abe0b2ed
MD5 9e26b9fc7097905d77a0292696f6eee0
BLAKE2b-256 971e8fac37590599c0c5596b638e14fb00706bd1d248c64b27f4c3d7b3f26dfc

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