Skip to main content

A conventional commits validation library

Project description

mi4-conventional-commits-lib

A Python library for validating conventional commits.

Installation

pip install .

Usage

from mi4_conventional_commits_lib import parseCommit, isCommitValid, buildCommit, getCommitTypes

# Validate a commit
result = validateCommit("feat: new feature (#123)")
print(result)  # True

# Parse a commit
parsed = parseCommit("fix(auth)!: fix bug (#456)")
print(parsed)  # {'type': 'fix', 'scope': 'auth', ...}

# Build a commit
commit_obj = {
    "type": "feat",
    "scope": "api",
    "breakChange": True,
    "description": "new API",
    "issue": 789
}
built = buildCommit(commit_obj)
print(built)  # "feat(api)!: new API (#789)"

Available Functions

  • parseCommit: parseCommit function
  • isCommitValid: isCommitValid function
  • buildCommit: buildCommit function
  • getCommitTypes: getCommitTypes function

License

MIT 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

mi4_conventional_commits_lib-0.0.16.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

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

mi4_conventional_commits_lib-0.0.16-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file mi4_conventional_commits_lib-0.0.16.tar.gz.

File metadata

File hashes

Hashes for mi4_conventional_commits_lib-0.0.16.tar.gz
Algorithm Hash digest
SHA256 23066cf0947757bef0bb192008387ac68bd6f42d1f88847118913c5a137847ae
MD5 9652ce0bab111182a03eefedb58ad03c
BLAKE2b-256 4bea37c3fe891aa079370036befbd5bab47b12a3d7067e0c252eb6155230271c

See more details on using hashes here.

File details

Details for the file mi4_conventional_commits_lib-0.0.16-py3-none-any.whl.

File metadata

File hashes

Hashes for mi4_conventional_commits_lib-0.0.16-py3-none-any.whl
Algorithm Hash digest
SHA256 bab91d1d5bac94958fffce123b262ce031628ba4c8aba1b3a40a2ad06b6f41dc
MD5 c553a083b63f07ada317e1329d1d472a
BLAKE2b-256 e6c880c7d0a37c5f5fda9e4dbc5061adb29b588b2363a65ba49f549783d602b0

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