Skip to content

Commit bb8a3b7

Browse files
authored
feat: allow bump commits (#55)
1 parent 0d9c8d1 commit bb8a3b7

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

src/commitlint/constants.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,6 @@
2424
r"^(Merged (.*?)(in|into) (.*)|Merged PR (.*): (.*))$|"
2525
r"^Merge remote-tracking branch(\s*)(.*)$|"
2626
r"^Automatic merge(.*)$|"
27-
r"^Auto-merged (.*?) into (.*)$"
27+
r"^Auto-merged (.*?) into (.*)$|"
28+
r"[Bb]ump [^\s]+ from [^\s]+ to [^\s]+"
2829
)

tests/fixtures/linter.py

+10
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,17 @@
5151
True,
5252
[],
5353
),
54+
("feat!: breaking feature", True, []),
55+
# ignored commits (success)
5456
("Merge pull request #123", True, []),
57+
("Bump urllib3 from 1.26.5 to 1.26.17", True, []),
58+
("Bump github.com/ollama/ollama from 0.1.48 to 0.2.0", True, []),
59+
("bump @babel/traverse from 7.22.17 to 7.24.0", True, []),
60+
(
61+
"Bump github.com/ollama/ollama from 0.1.48 to 0.2.0\n\nthis is a commit body",
62+
True,
63+
[],
64+
),
5565
# incorrect format check
5666
("feat add new feature", False, [INCORRECT_FORMAT_ERROR]),
5767
# header length check

0 commit comments

Comments
 (0)