Skip to content

Commit 83cd369

Browse files
authored
Merge pull request #7610 from IgniteUI/git-hooks-enhanement
feat(git-hooks): remove types mondatory issues
2 parents a90b14c + bc09ff7 commit 83cd369

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

.hooks/scripts/templates/default.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ var defaults = {
1111
otherLine: 80,
1212
},
1313
issuePattern: '(#)[0-9]+',
14-
typesWithMandatoryIssue: [ 'feat', 'fix', 'test' ],
14+
typesWithMandatoryIssue: [],
1515
guidelinesUrl: 'https://bit.ly/angular-guidelines',
1616
types: [
1717
'feat', 'fix', 'docs', 'style', 'refactor', 'perf', 'test', 'chore', 'build', 'ci', 'revert'
@@ -20,4 +20,4 @@ var defaults = {
2020
oldMessagePath: path.join('.git', 'COMMIT_EDITMSG_OLD')
2121
}
2222

23-
module.exports = defaults;
23+
module.exports = defaults;

.hooks/scripts/utils/issue-validator.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ var matchType = require('../common').matchType,
66
module.exports = (lines, options, errors) => {
77
var ticket = new RegExp(options.issuePattern);
88
var whetherIssueIsMandatory = false,
9-
wheterMatchAnyIssueRef = false;
9+
wheterMatchAnyIssueRef = false;
10+
1011

11-
1212
if (matchType(options.typesWithMandatoryIssue, lines[0])) {
1313
whetherIssueIsMandatory = true;
1414
}
@@ -27,7 +27,7 @@ module.exports = (lines, options, errors) => {
2727

2828
if (whetherIssueIsMandatory && !wheterMatchAnyIssueRef) {
2929
errors.push(errorFactory(
30-
`The issue reference for (${options.typesWithMandatoryIssue.join(', ')}) types is mandatory!\n`,
30+
`The issue reference for (${options.typesWithMandatoryIssue.join(', ')}) types is mandatory!\n`,
3131
"Please add at least one related issue. E.g: Closes #31, Closes #45"));
3232
}
33-
}
33+
}

0 commit comments

Comments
 (0)