Skip to content

Commit be9bf4f

Browse files
committed
ci: check CIRCLE_BRANCH when validating commits
1 parent ae04726 commit be9bf4f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/validate-commits.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ export default function (argv: ValidateCommitsOptions, logger: logging.Logger) {
113113
sha = argv.head || 'HEAD';
114114
} else {
115115
const parentRemote = process.env['GIT_REMOTE'] ? process.env['GIT_REMOTE'] + '/' : '';
116-
const parentBranch = process.env['GIT_BRANCH'] || 'master';
116+
const parentBranch = process.env['GIT_BRANCH'] || process.env['CIRCLE_BRANCH'] || 'master';
117117
baseSha = execSync(`git merge-base --fork-point "${parentRemote}${parentBranch}"`)
118118
.toString().trim();
119119
sha = 'HEAD';

0 commit comments

Comments
 (0)