Skip to content

Commit ddb470c

Browse files
byCedricmarionebl
authored andcommitted
feat: add bitbucket merge commits to ignore list (#304)
1 parent b1454d1 commit ddb470c

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

Diff for: @commitlint/is-ignored/src/index.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ const WILDCARDS = [
1414
.shift()
1515
.replace(/^chore(\([^)]+\))?:/, '')
1616
.trim()
17-
)
17+
),
18+
c => c.match(/^Merged (.*?)(in|into) (.*)/)
1819
];
1920

2021
export default function isIgnored(commit = '') {

Diff for: @commitlint/is-ignored/src/index.test.js

+7
Original file line numberDiff line numberDiff line change
@@ -96,3 +96,10 @@ test('should return true fixup commits', t => {
9696
test('should return true squash commits', t => {
9797
t.true(isIgnored('squash! initial commit'));
9898
});
99+
100+
test('should return true for bitbucket merge commits', t => {
101+
t.true(
102+
isIgnored('Merged in feature/facebook-friends-sync (pull request #8)')
103+
);
104+
t.true(isIgnored('Merged develop into feature/component-form-select-card'));
105+
});

0 commit comments

Comments
 (0)