fix(dev-infra): correct the environment variable to skip husky during merge (#40025)

With the migration to husky@5, the environment variable used to skip husky changed from
`HUSKY_SKIP_HOOKS` to `HUSKY`.  To continue skipping husky during the merge process as
expected, the environment variable used is updated.

PR Close #40025
This commit is contained in:
Joey Perrott 2020-12-08 09:12:11 -08:00 committed by Misko Hevery
parent 61b9adb1b1
commit 634c393d35
2 changed files with 2 additions and 2 deletions

View File

@ -4208,7 +4208,7 @@ function mergePullRequest(prNumber, githubToken, projectRoot, config) {
case 0: case 0:
// Set the environment variable to skip all git commit hooks triggered by husky. We are unable to // Set the environment variable to skip all git commit hooks triggered by husky. We are unable to
// rely on `--no-verify` as some hooks still run, notably the `prepare-commit-msg` hook. // rely on `--no-verify` as some hooks still run, notably the `prepare-commit-msg` hook.
process.env['HUSKY_SKIP_HOOKS'] = '1'; process.env['HUSKY'] = '0';
return [4 /*yield*/, createPullRequestMergeTask(githubToken, projectRoot, config)]; return [4 /*yield*/, createPullRequestMergeTask(githubToken, projectRoot, config)];
case 1: case 1:
api = _a.sent(); api = _a.sent();

View File

@ -34,7 +34,7 @@ export async function mergePullRequest(
config?: MergeConfigWithRemote) { config?: MergeConfigWithRemote) {
// Set the environment variable to skip all git commit hooks triggered by husky. We are unable to // Set the environment variable to skip all git commit hooks triggered by husky. We are unable to
// rely on `--no-verify` as some hooks still run, notably the `prepare-commit-msg` hook. // rely on `--no-verify` as some hooks still run, notably the `prepare-commit-msg` hook.
process.env['HUSKY_SKIP_HOOKS'] = '1'; process.env['HUSKY'] = '0';
const api = await createPullRequestMergeTask(githubToken, projectRoot, config); const api = await createPullRequestMergeTask(githubToken, projectRoot, config);