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

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for mi4_conventional_commits_lib-0.1.7.tar.gz
Algorithm Hash digest
SHA256 5aa6d524beca7b5634883abf1037ac9f65af4df2f42fb7ca0f6608018c5a44c8
MD5 4c4ff249a453d29c8ad6311818dbeb55
BLAKE2b-256 be72c7fb5d3456765a74c1d7f012b05908d965ca5096ff70c0b49eca95f6b561

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mi4_conventional_commits_lib-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 a96cf8cb8f89251763b144e770d278459ca0ea11b358b612f1dca5b13d6d3eae
MD5 ad0adf1530599bbb237b3897c51e9ce9
BLAKE2b-256 c694c58d16195e8df46789cab2110a1ecab94baa3ef7d43929cc0fb800502d50

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