1
0
mirror of synced 2025-12-22 11:26:57 -05:00

Explicitly unset the DOCUBOT_REPO_PAT Heroku config var when possible (#21751)

This commit is contained in:
James M. Greene
2021-09-27 13:22:02 -05:00
committed by GitHub
parent d7aaa98c97
commit 1024ede61d
2 changed files with 7 additions and 3 deletions

View File

@@ -54,7 +54,9 @@ export default async function deployToProduction({
// If prebuilt: prevent the Heroku Node.js buildpack from using `npm ci` as it would
// delete all of the vendored "node_modules/" directory.
USE_NPM_INSTALL: isPrebuilt.toString(),
...(!isPrebuilt && DOCUBOT_REPO_PAT && { DOCUBOT_REPO_PAT }),
// If not prebuilt, include the PAT required for cloning the `docs-early-access` repo.
// Otherwise, set it to `null` to unset it from the environment for security.
DOCUBOT_REPO_PAT: (!isPrebuilt && DOCUBOT_REPO_PAT) || null,
}
const workflowRunLog = runId ? `https://github.com/${owner}/${repo}/actions/runs/${runId}` : null