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

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for mi4_conventional_commits_lib-0.1.1.tar.gz
Algorithm Hash digest
SHA256 6daff8c365606d09f4942e392c0070b155af8b6022189f050aeb13513395fa7f
MD5 c68869281f43861549c79363c3d5f1e2
BLAKE2b-256 4ffdd50f6b7a87157555fc480565a466794a3c9425beac77cd39c9e21408538b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mi4_conventional_commits_lib-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 eb25daa74b7607ab03263c54356389365752e2c93417ac45c7b2b38fcfe172a5
MD5 4d4c47b8aef8fef2f8a5012ea47d18db
BLAKE2b-256 6daeaf4a5c80536a6f37de2763fc7691ab25e808ebc1af4fef4920d589c9e1ec

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