File tree 1 file changed +20
-1
lines changed
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(
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 ):
You can’t perform that action at this time.
0 commit comments