ci: only lint commit messages on PRs (#35035)
As all commit messages are linted during the PR process, we do not need to relint these previous commit messages on upstream branches. PR Close #35035
This commit is contained in:
parent
e6cb60ee22
commit
c2c4aea97d
|
@ -10,6 +10,14 @@
|
||||||
// tslint:disable:no-console
|
// tslint:disable:no-console
|
||||||
module.exports = (gulp) => () => {
|
module.exports = (gulp) => () => {
|
||||||
try {
|
try {
|
||||||
|
if (process.env['CIRCLECI'] === 'true' && !process.env['CIRCLE_PR_NUMBER']) {
|
||||||
|
console.info(
|
||||||
|
`Since commit messages are validated as part of the PR review process,\n` +
|
||||||
|
`we do not need to commit messages on CI runs on upstream branches.\n\n` +
|
||||||
|
`Skipping validate-commit-message check`
|
||||||
|
)
|
||||||
|
process.exit();
|
||||||
|
}
|
||||||
const validateCommitMessage = require('../validate-commit-message');
|
const validateCommitMessage = require('../validate-commit-message');
|
||||||
const shelljs = require('shelljs');
|
const shelljs = require('shelljs');
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue