@@ -43,7 +43,26 @@ def find_increment_by_callable(
43
43
class BumpRule (Protocol ):
44
44
def get_increment (
45
45
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
+ ...
47
66
48
67
49
68
class ConventionalCommitBumpRule (BumpRule ):
@@ -122,6 +141,3 @@ def get_increment(
122
141
if re .match (match_pattern , found_keyword ):
123
142
return increment
124
143
return None
125
-
126
-
127
- # TODO: Implement CustomBumpRule
0 commit comments