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.13.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.13-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for mi4_conventional_commits_lib-0.0.13.tar.gz
Algorithm Hash digest
SHA256 536bc02e943d166a90fe6d4a9b6cb1a07434f39607bd3a4b684a340b92ec5a03
MD5 f85742edea8bfafc3ed1f5de3e25f0cf
BLAKE2b-256 ed4daad6d2f814001e8869dd4af5339a5fbd99c98c61f0911b0ea7ef6e39f69a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mi4_conventional_commits_lib-0.0.13-py3-none-any.whl
Algorithm Hash digest
SHA256 1a89aae9d1be48e5ffa5618ad27f12be8c2108f5030302ef10c0f2c60e4b7733
MD5 e195713b02288722811739411ee53d7f
BLAKE2b-256 b42f7fd6526a9f9fa1bc60faceed23626c3bf27c1c52a0fd81cb8e512444f3a4

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