Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix(is-ignored): ignore azure devops messages
The following Azure DevOps auto-generated merge commit message formats are being considered erros:
- "Merge remote-tracking branch" (fails because is has no whitespace at the end)
- "Merged PR 123: Description here" (fails because it does not contain "in" or "into")
  • Loading branch information
toureholder committed Oct 23, 2020
commit ec1e6a7cff755d375fe9f6b805489b5b1f16c9be
4 changes: 2 additions & 2 deletions @commitlint/is-ignored/src/defaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ export const wildcards: Matcher[] = [
test(/^(R|r)evert (.*)/),
test(/^(fixup|squash)!/),
isSemver,
test(/^Merged (.*?)(in|into) (.*)/),
test(/^Merge remote-tracking branch (.*)/),
test(/^(Merged (.*?)(in|into) (.*)|Merged PR (.*): (.*))/),
test(/^Merge remote-tracking branch(\s*)(.*)/),
test(/^Automatic merge(.*)/),
test(/^Auto-merged (.*?) into (.*)/),
];
5 changes: 5 additions & 0 deletions @commitlint/is-ignored/src/is-ignored.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,11 @@ test('should return true for bitbucket merge commits', () => {

test('should return true for automatic merge commits', () => {
expect(isIgnored('Auto-merged develop into master')).toBe(true);
expect(isIgnored('Merge remote-tracking branch')).toBe(true);
});

test('should return true for azure devops merge commits', () => {
expect(isIgnored('Merged PR 123: Description here')).toBe(true);
});

test('should return false for commits containing, but not starting, with merge branch', () => {
Expand Down