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

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for mi4_conventional_commits_lib-0.1.2.tar.gz
Algorithm Hash digest
SHA256 62cb5be6318edeec5fac74cebb883d031bcc428d55928d95e3a8e52fdf751d38
MD5 b1fe3fd2411a854aa653eca47ebadeb3
BLAKE2b-256 0f362b14941441a8e8b80c56a48dce4089517fa30459266c3017d283d5cca3b4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mi4_conventional_commits_lib-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b815e2853025093e25b290b97202ff56bbe6c5f094aae39e98b688f882be11ec
MD5 225ad417d5dcdfe369487967ae008032
BLAKE2b-256 ee436ef8181b151dcc2aa79390f064fa7cdae296489e30f443fc960865c945dd

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