Skip to content

Commit 481d345

Browse files
Jordan Carrollmarionebl
authored andcommitted
feat: add wildcard for Github deployment commits (#329)
Github deployments have an auto_merge parameter that attempts to automatically merge the default branch into the requested ref, if it is behind the default branch . This commit ignores the auto-generated commit messages
1 parent 663be67 commit 481d345

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

@commitlint/is-ignored/src/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ const WILDCARDS = [
1515
.replace(/^chore(\([^)]+\))?:/, '')
1616
.trim()
1717
),
18-
c => c.match(/^Merged (.*?)(in|into) (.*)/)
18+
c => c.match(/^Merged (.*?)(in|into) (.*)/),
19+
c => c.match(/^Auto-merged (.*?) into (.*)/)
1920
];
2021

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

@commitlint/is-ignored/src/index.test.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,3 +103,7 @@ test('should return true for bitbucket merge commits', t => {
103103
);
104104
t.true(isIgnored('Merged develop into feature/component-form-select-card'));
105105
});
106+
107+
test('should return true for automatic merge commits', t => {
108+
t.true(isIgnored('Auto-merged develop into master'));
109+
});

0 commit comments

Comments
 (0)