@@ -108,6 +108,42 @@ def test_find_increment(messages, expected_type):
108108 assert increment_type == expected_type
109109
110110
111+ def test_find_increment_with_ignored_sha ():
112+ messages = [
113+ "docs(README): motivation" ,
114+ "BREAKING CHANGE: your upstream dependency have some breaking changes" ,
115+ ]
116+ commits = [
117+ GitCommit (rev = "test1" , title = messages [0 ]),
118+ GitCommit (rev = "test2" , title = messages [1 ]),
119+ ]
120+ increment_type = bump .find_increment (
121+ commits ,
122+ regex = ConventionalCommitsCz .bump_pattern ,
123+ increments_map = ConventionalCommitsCz .bump_map ,
124+ ignore_bump_sha_list = ["test2" ],
125+ )
126+ assert increment_type is None
127+
128+
129+ def test_find_increment_with_ignored_author ():
130+ messages = [
131+ "BREAKING CHANGE: your upstream dependency have some breaking changes" ,
132+ "docs(README): motivation" ,
133+ ]
134+ commits = [
135+ GitCommit (rev = "test1" , title = messages [0 ], author = "alice" ),
136+ GitCommit (rev = "test2" , title = messages [1 ], author = "bob" ),
137+ ]
138+ increment_type = bump .find_increment (
139+ commits ,
140+ regex = ConventionalCommitsCz .bump_pattern ,
141+ increments_map = ConventionalCommitsCz .bump_map ,
142+ ignore_bump_author_list = ["alice" ],
143+ )
144+ assert increment_type is None
145+
146+
111147@pytest .mark .parametrize (
112148 ("messages" , "expected_type" ),
113149 [
0 commit comments