File tree Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,26 @@ def find_increment_by_callable(
4343class BumpRule (Protocol ):
4444 def get_increment (
4545 self , commit_message : str , major_version_zero : bool
46- ) -> Increment | None : ...
46+ ) -> Increment | None :
47+ """Determine the version increment based on a commit message.
48+
49+ This method analyzes a commit message to determine what kind of version increment
50+ is needed according to the Conventional Commits specification. It handles special
51+ cases for breaking changes and respects the major_version_zero flag.
52+
53+ Args:
54+ commit_message: The commit message to analyze. Should follow conventional commit format.
55+ major_version_zero: If True, breaking changes will result in a MINOR version bump
56+ instead of MAJOR. This is useful for projects in 0.x.x versions.
57+
58+ Returns:
59+ Increment | None: The type of version increment needed:
60+ - "MAJOR": For breaking changes when major_version_zero is False
61+ - "MINOR": For breaking changes when major_version_zero is True, or for new features
62+ - "PATCH": For bug fixes, performance improvements, or refactors
63+ - None: For commits that don't require a version bump (docs, style, etc.)
64+ """
65+ ...
4766
4867
4968class ConventionalCommitBumpRule (BumpRule ):
You can’t perform that action at this time.
0 commit comments