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.14.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.

File details

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

File metadata

File hashes

Hashes for mi4_conventional_commits_lib-0.0.14.tar.gz
Algorithm Hash digest
SHA256 8d35c4151a7d4ce54aec45f092ff6e2654ae5332fd08e58548fba93459870f2c
MD5 27e6c23cd280a48ab6a9381a9d1bd334
BLAKE2b-256 00a54942dc4c6f5c3ef38b886f6bd089216a2aad14f3194f467c5c814d9f9b39

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mi4_conventional_commits_lib-0.0.14-py3-none-any.whl
Algorithm Hash digest
SHA256 a8a4e9ed78858b6b918b65de205790a752c535cfd1ab6533d01fa9527f560d60
MD5 aa2d710e708d10fee8cf22f608947f2b
BLAKE2b-256 469b134a10f06351ba6ae624175844d5257a2c67f1e82b63347d57fb9d00852a

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