feat(dev-infra): commit message validation should skip lines consisting of URLs (#37890)
The dev-infra commit message validation optionally can check for lines to not exceed a given amount of characters. This is desired for most commit messages, but sometimes not actionable if a long URL is inserted into the commit message. With this commit, we skip the max line length check for lines that start with an URL. PR Close #37890
This commit is contained in:

committed by
Andrew Scott

parent
e6afcf1f94
commit
9bd4b74b06
@ -77,6 +77,15 @@ describe('validate-commit-message.js', () => {
|
||||
config.commitMessage.maxLineLength} characters`);
|
||||
});
|
||||
|
||||
it('should skip max length limit for URLs', () => {
|
||||
const msg = 'fix(compiler): this is just an usual commit message tile\n\n' +
|
||||
'This is a normal commit message body which does not exceed the max length\n' +
|
||||
'limit. For more details see the following super long URL:\n\n' +
|
||||
'https://github.com/angular/components/commit/e2ace018ddfad10608e0e32932c43dcfef4095d7#diff-9879d6db96fd29134fc802214163b95a';
|
||||
|
||||
expect(validateCommitMessage(msg)).toBe(VALID);
|
||||
});
|
||||
|
||||
it('should validate "<type>(<scope>): <subject>" format', () => {
|
||||
const msg = 'not correct format';
|
||||
|
||||
|
Reference in New Issue
Block a user