Skip to main content

GIT Commit Check - check the commit for certain rules

Project description

maintained programming language license

github actions requirements

pypi


GitCC checks commit messages for certain rules.

To use as a GitHub Actions refer to the commit-check-python section in example.

To expand gitcc to apply your own rules inherit from gitcc.commit_validator.Validator. If you use the --validator-file argument the Validator class in that file must be named Validator.

Shipped validators

gitcc.validation.SimpleTag

Format: [<tag>] <Good Description> (e.g. [ci] Fix testing suite installation)


gitcc [-h] [-v] [--validator | --validator-file] {message, git-hook, commit, history, branch}

–validator <Python import path>

Python import path to Validator class. Example: --validator gitcc.validation.SimpleTag

–validator-file <file path>

Path to file with Validator.. Example: --validator-file my_validator.py


message <text>

check the given message

text

text to check


git-hook [–force] <action> <hooks> [<hooks> …] <repository>

install or uninstall a git hook

<action>

Install or uninstall. [install, uninstall]

<hooks>

Choose available hooks. [message]

<repository>

path to the repository

[options]
–force

Force install or uninstall, this might override existing files!


commit <repository>

check current commit

<repository>

path to the repository


history [–sha <SHA>] [–verbose] <repository>

check the current branch history

<repository>

path to the repository

[options]
–sha <SHA>

check until this commit (exclusive)

–verbose

print correct commits too


branch [–verbose] <target> <repository>

check the current branch with an other branch common ancestor. Is the same as gitcc history with git merge-base <source> <target>

<target>

target branch

<repository>

path to the repository

[options]
–verbose

print correct commits too


-h, –help

show this help message and exit

-v, –version

show program’s version number and exit


Examples

gitcc --validator gitcc.validation.SimpleTag message "Is this a valid message?"

Web

https://github.com/IceflowRE/gitcc

Credits

Third Party

GitPython

License

Copyright 2021-present Iceflower S (iceflower@gmx.de)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

gitcc-2.0.6-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file gitcc-2.0.6-py3-none-any.whl.

File metadata

  • Download URL: gitcc-2.0.6-py3-none-any.whl
  • Upload date:
  • Size: 9.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for gitcc-2.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 7365efad5b724a7e436330b9deac98ac54725aad0740a2a7ce1864e1cdf097e5
MD5 8103fe576c3c03e48444c702453bbb95
BLAKE2b-256 f8682e1e9d7eef1faa9f08fb58d4484bb6ecd87ab743883269463cf5d3521659

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