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

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for mi4_conventional_commits_lib-0.0.7.tar.gz
Algorithm Hash digest
SHA256 369f33b59224a93bc4b947774e6a610da19725524f1ebda8d521321da352b597
MD5 f2afa0f74e511a671a5e187c4ffbea4c
BLAKE2b-256 2c19f1eca6a6d1249ca661a6a7967323dddc591af81f76a188106e78b5101ab4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mi4_conventional_commits_lib-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 9a447b6b8e7c40d1fbe54fe91f7be1bd22095abf66bad1217e3b148005adbc90
MD5 a155abea17b64d36e5ec027fede8002f
BLAKE2b-256 926cfcf893739808f24ec2258e3b9690c12354f3725b4d2914c3b08f16c9a69a

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