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

# 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

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.12.tar.gz (7.4 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.12-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for mi4_conventional_commits_lib-0.0.12.tar.gz
Algorithm Hash digest
SHA256 2b6a5a9cffdf7833939d556eb328ab2a61ef741bb1ea00bb3ba6c395014c960b
MD5 e2d9f7a488cc3caf34a0259fbda82e24
BLAKE2b-256 63d5c90ca6163232c0195b6c200515a916e24164b011cc54a86deb3d661015ac

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mi4_conventional_commits_lib-0.0.12-py3-none-any.whl
Algorithm Hash digest
SHA256 ca7ea9e4dde21b7bc434079aac61dc8b08a843ada50c3686923fb11b2711094e
MD5 7251efeff4d107c2f2f1a78d138ec078
BLAKE2b-256 c010861b8513d8c517e0b385d58ae3ac586cb64e7e899cf749d89be82e72e202

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