Skip to content

Commit

Permalink
fix(dev-infra): correct the environment variable to skip husky during…
Browse files Browse the repository at this point in the history
… 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
  • Loading branch information
josephperrott authored and mhevery committed Dec 9, 2020
1 parent 38975ec commit 03c3e07
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dev-infra/ng-dev.js
Expand Up @@ -4208,7 +4208,7 @@ function mergePullRequest(prNumber, githubToken, projectRoot, config) {
case 0:
// 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.
process.env['HUSKY_SKIP_HOOKS'] = '1';
process.env['HUSKY'] = '0';
return [4 /*yield*/, createPullRequestMergeTask(githubToken, projectRoot, config)];
case 1:
api = _a.sent();
Expand Down
2 changes: 1 addition & 1 deletion dev-infra/pr/merge/index.ts
Expand Up @@ -34,7 +34,7 @@ export async function mergePullRequest(
config?: MergeConfigWithRemote) {
// 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.
process.env['HUSKY_SKIP_HOOKS'] = '1';
process.env['HUSKY'] = '0';

const api = await createPullRequestMergeTask(githubToken, projectRoot, config);

Expand Down

0 comments on commit 03c3e07

Please sign in to comment.