diff --git a/tools/gulp-tasks/validate-commit-message.js b/tools/gulp-tasks/validate-commit-message.js index 704e2d1fba..0930c6f64f 100644 --- a/tools/gulp-tasks/validate-commit-message.js +++ b/tools/gulp-tasks/validate-commit-message.js @@ -10,6 +10,14 @@ // tslint:disable:no-console module.exports = (gulp) => () => { 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 shelljs = require('shelljs');