validate commit messages and metadata
Project description
Validate Commits
Validate commit messages and metadata.
Usage
$ validate-commits --help
usage: validate-commits [-h]
options:
-h, --help show this help message and exit
The tool will check all commits
between main and the current HEAD.
Checks
Built-in rules
There are several built-in rules, which are checked automatically:
- "Commit author has no email"
-- all commits must have an author email
and all co-authors (in
Co-authored-bytrailers) must have an email. - "Commit is empty" -- empty commits are not allowed.
- "Fixup commit" -- 'fixup' commits should be squashed into the commit they fix up.
Custom rules
Custom rules may be provided in a validate-commits-config.toml file.
Rules must be provided as a regular expression pattern and an error message
and will be checked against the designated target.
Commit summary
Checks for the commit summary (the first line of the commit message)
may be defined in a [[checks.summary]] table,
e.g:
[[checks.summary]]
pattern = '\d'
message = "Numbers in commit summary."
Author email
Checks for author and co-author email addresses
may be defined in a [[checks.author_email]] table,
e.g:
[[checks.author_email]]
pattern = '@example\.(com|net|org)$'
message = "Fake email address provided."
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file validate_commits-0.0.2.tar.gz.
File metadata
- Download URL: validate_commits-0.0.2.tar.gz
- Upload date:
- Size: 6.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b6e4ef87037c40951ed9038b9e6c0a465ca1465e20594b7518e79e10e21b605
|
|
| MD5 |
ecd01d9c1056356d67a3f8f44e47a241
|
|
| BLAKE2b-256 |
54820cf127159e825cf6fa869bcb6fae94250e4860e077919a998d31ad325ed9
|
Provenance
The following attestation bundles were made for validate_commits-0.0.2.tar.gz:
Publisher:
build_and_publish.yaml on samueljsb/validate-commits
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
validate_commits-0.0.2.tar.gz -
Subject digest:
5b6e4ef87037c40951ed9038b9e6c0a465ca1465e20594b7518e79e10e21b605 - Sigstore transparency entry: 1203634397
- Sigstore integration time:
-
Permalink:
samueljsb/validate-commits@f80ab2c01c97f506385b1567c1db2d3aa47e227a -
Branch / Tag:
refs/tags/v0.0.2 - Owner: https://github.com/samueljsb
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build_and_publish.yaml@f80ab2c01c97f506385b1567c1db2d3aa47e227a -
Trigger Event:
push
-
Statement type:
File details
Details for the file validate_commits-0.0.2-py3-none-any.whl.
File metadata
- Download URL: validate_commits-0.0.2-py3-none-any.whl
- Upload date:
- Size: 8.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
589ef275913ca6a6f71e024db430e3d513e1a2e61d3235a389dd6a3ff652b9c1
|
|
| MD5 |
1e776e7745c60b6de8f1dc36842d1cbc
|
|
| BLAKE2b-256 |
5f1598e4ed0d029c8e7c0c0b735d82821e1ef1954067443d0b9b69c43654c55d
|
Provenance
The following attestation bundles were made for validate_commits-0.0.2-py3-none-any.whl:
Publisher:
build_and_publish.yaml on samueljsb/validate-commits
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
validate_commits-0.0.2-py3-none-any.whl -
Subject digest:
589ef275913ca6a6f71e024db430e3d513e1a2e61d3235a389dd6a3ff652b9c1 - Sigstore transparency entry: 1203634404
- Sigstore integration time:
-
Permalink:
samueljsb/validate-commits@f80ab2c01c97f506385b1567c1db2d3aa47e227a -
Branch / Tag:
refs/tags/v0.0.2 - Owner: https://github.com/samueljsb
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build_and_publish.yaml@f80ab2c01c97f506385b1567c1db2d3aa47e227a -
Trigger Event:
push
-
Statement type: