renovate 42.19.10 → 42.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config/migrate-validate.js +1 -2
- package/dist/config/migrate-validate.js.map +1 -1
- package/dist/config/migration.js +0 -1
- package/dist/config/migration.js.map +1 -1
- package/dist/config/options/index.js +1 -1
- package/dist/config/options/index.js.map +1 -1
- package/dist/instrumentation/index.js +3 -4
- package/dist/instrumentation/index.js.map +1 -1
- package/dist/modules/datasource/crate/index.js +1 -1
- package/dist/modules/datasource/crate/index.js.map +1 -1
- package/dist/modules/datasource/docker/common.js +6 -0
- package/dist/modules/datasource/docker/common.js.map +1 -1
- package/dist/modules/datasource/docker/schema.js +1 -1
- package/dist/modules/datasource/docker/schema.js.map +1 -1
- package/dist/modules/datasource/go/index.js +1 -2
- package/dist/modules/datasource/go/index.js.map +1 -1
- package/dist/modules/datasource/maven/index.js +2 -2
- package/dist/modules/datasource/maven/index.js.map +1 -1
- package/dist/modules/datasource/maven/util.js +2 -2
- package/dist/modules/datasource/maven/util.js.map +1 -1
- package/dist/modules/manager/bazel/artifacts.js +2 -2
- package/dist/modules/manager/bazel/artifacts.js.map +1 -1
- package/dist/modules/manager/maven-wrapper/artifacts.js +2 -2
- package/dist/modules/manager/maven-wrapper/artifacts.js.map +1 -1
- package/dist/modules/manager/npm/extract/common/package-file.js +2 -2
- package/dist/modules/manager/npm/extract/common/package-file.js.map +1 -1
- package/dist/modules/manager/npm/extract/yarn.js +2 -2
- package/dist/modules/manager/npm/extract/yarn.js.map +1 -1
- package/dist/modules/manager/npm/post-update/index.js +14 -18
- package/dist/modules/manager/npm/post-update/index.js.map +1 -1
- package/dist/modules/manager/npm/post-update/npm.js +4 -4
- package/dist/modules/manager/npm/post-update/npm.js.map +1 -1
- package/dist/modules/manager/npm/post-update/pnpm.js +4 -4
- package/dist/modules/manager/npm/post-update/pnpm.js.map +1 -1
- package/dist/modules/manager/npm/post-update/yarn.js +6 -6
- package/dist/modules/manager/npm/post-update/yarn.js.map +1 -1
- package/dist/modules/manager/npm/update/dependency/index.js +3 -4
- package/dist/modules/manager/npm/update/dependency/index.js.map +1 -1
- package/dist/modules/manager/npm/update/dependency/pnpm.js +2 -2
- package/dist/modules/manager/npm/update/dependency/pnpm.js.map +1 -1
- package/dist/modules/manager/npm/update/index.js +1 -0
- package/dist/modules/manager/npm/update/index.js.map +1 -1
- package/dist/modules/manager/npm/update/locked-dependency/common/parent-version.js +8 -8
- package/dist/modules/manager/npm/update/locked-dependency/common/parent-version.js.map +1 -1
- package/dist/modules/manager/npm/update/locked-dependency/package-lock/dep-constraints.js +2 -2
- package/dist/modules/manager/npm/update/locked-dependency/package-lock/dep-constraints.js.map +1 -1
- package/dist/modules/manager/npm/update/locked-dependency/package-lock/index.js +5 -5
- package/dist/modules/manager/npm/update/locked-dependency/package-lock/index.js.map +1 -1
- package/dist/modules/manager/npm/update/locked-dependency/yarn-lock/get-locked.js +4 -4
- package/dist/modules/manager/npm/update/locked-dependency/yarn-lock/get-locked.js.map +1 -1
- package/dist/modules/manager/npm/update/locked-dependency/yarn-lock/index.js +2 -2
- package/dist/modules/manager/npm/update/locked-dependency/yarn-lock/index.js.map +1 -1
- package/dist/modules/manager/npm/update/locked-dependency/yarn-lock/replace.js +2 -2
- package/dist/modules/manager/npm/update/locked-dependency/yarn-lock/replace.js.map +1 -1
- package/dist/modules/manager/npm/update/package-version/index.js +1 -2
- package/dist/modules/manager/npm/update/package-version/index.js.map +1 -1
- package/dist/modules/manager/npm/utils.js +8 -8
- package/dist/modules/manager/npm/utils.js.map +1 -1
- package/dist/modules/platform/azure/azure-helper.js +2 -2
- package/dist/modules/platform/azure/azure-helper.js.map +1 -1
- package/dist/modules/platform/azure/index.js +14 -14
- package/dist/modules/platform/azure/index.js.map +1 -1
- package/dist/modules/platform/bitbucket/comments.js +4 -4
- package/dist/modules/platform/bitbucket/comments.js.map +1 -1
- package/dist/modules/platform/bitbucket/index.js +31 -31
- package/dist/modules/platform/bitbucket/index.js.map +1 -1
- package/dist/modules/platform/bitbucket/utils.js +2 -2
- package/dist/modules/platform/bitbucket/utils.js.map +1 -1
- package/dist/modules/platform/bitbucket-server/index.js +32 -34
- package/dist/modules/platform/bitbucket-server/index.js.map +1 -1
- package/dist/modules/platform/bitbucket-server/utils.js +2 -4
- package/dist/modules/platform/bitbucket-server/utils.js.map +1 -1
- package/dist/modules/platform/codecommit/codecommit-client.js +6 -6
- package/dist/modules/platform/codecommit/codecommit-client.js.map +1 -1
- package/dist/modules/platform/codecommit/index.js +24 -24
- package/dist/modules/platform/codecommit/index.js.map +1 -1
- package/dist/modules/platform/gitea/index.js +4 -4
- package/dist/modules/platform/gitea/index.js.map +1 -1
- package/dist/modules/platform/github/index.js +68 -68
- package/dist/modules/platform/github/index.js.map +1 -1
- package/dist/modules/platform/github/massage-markdown-links.js +2 -2
- package/dist/modules/platform/github/massage-markdown-links.js.map +1 -1
- package/dist/modules/platform/github/pr.js +2 -2
- package/dist/modules/platform/github/pr.js.map +1 -1
- package/dist/modules/platform/github/schema.js +1 -2
- package/dist/modules/platform/github/schema.js.map +1 -1
- package/dist/modules/platform/gitlab/index.js +29 -30
- package/dist/modules/platform/gitlab/index.js.map +1 -1
- package/dist/modules/platform/utils/pr-body.js +7 -3
- package/dist/modules/platform/utils/pr-body.js.map +1 -1
- package/dist/proxy.js +1 -2
- package/dist/proxy.js.map +1 -1
- package/dist/util/cache/package/index.js +2 -2
- package/dist/util/cache/package/index.js.map +1 -1
- package/dist/util/cache/package/namespaces.js +1 -1
- package/dist/util/cache/package/namespaces.js.map +1 -1
- package/dist/util/git/error.js +5 -4
- package/dist/util/git/error.js.map +1 -1
- package/dist/util/git/index.js +10 -12
- package/dist/util/git/index.js.map +1 -1
- package/dist/util/git/private-key.js +2 -0
- package/dist/util/git/private-key.js.map +1 -1
- package/dist/util/http/bitbucket.js +1 -2
- package/dist/util/http/bitbucket.js.map +1 -1
- package/dist/util/http/cache/abstract-http-cache-provider.js +2 -2
- package/dist/util/http/cache/abstract-http-cache-provider.js.map +1 -1
- package/dist/util/http/http.js +1 -1
- package/dist/util/http/http.js.map +1 -1
- package/dist/util/stats.js +1 -1
- package/dist/util/stats.js.map +1 -1
- package/dist/workers/global/config/parse/codespaces.js +1 -2
- package/dist/workers/global/config/parse/codespaces.js.map +1 -1
- package/dist/workers/repository/update/branch/auto-replace.js +4 -2
- package/dist/workers/repository/update/branch/auto-replace.js.map +1 -1
- package/dist/workers/repository/update/branch/automerge.js +4 -1
- package/dist/workers/repository/update/branch/automerge.js.map +1 -1
- package/dist/workers/repository/update/branch/execute-post-upgrade-commands.js +1 -0
- package/dist/workers/repository/update/branch/execute-post-upgrade-commands.js.map +1 -1
- package/dist/workers/repository/update/branch/index.js +16 -8
- package/dist/workers/repository/update/branch/index.js.map +1 -1
- package/package.json +3 -2
- package/renovate-schema.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error.js","sourceRoot":"","sources":["../../../lib/util/git/error.ts"],"names":[],"mappings":";;AAMA,
|
|
1
|
+
{"version":3,"file":"error.js","sourceRoot":"","sources":["../../../lib/util/git/error.ts"],"names":[],"mappings":";;AAMA,0DAqEC;AAGD,8CAkEC;AAED,sDAEC;AApJD,mEAAmE;AACnE,yCAAsC;AACtC,gFAA2E;AAC3E,gCAAgC;AAGhC,SAAgB,uBAAuB,CAAC,GAAU;IAChD,IAAI,IAAA,YAAM,GAAE,CAAC,QAAQ,KAAK,MAAM,EAAE,CAAC;QACjC,OAAO,IAAI,CAAC;IACd,CAAC;IACD,MAAM,0BAA0B,GAAG;QACjC,sCAAsC;QACtC,2BAA2B;QAC3B,uCAAuC;QACvC,qCAAqC;QACrC,qCAAqC;QACrC,0CAA0C;QAC1C,gCAAgC;QAChC,sBAAsB;QACtB,sBAAsB;QACtB,uBAAuB;QACvB,wBAAwB;QACxB,WAAW;QACX,mBAAmB,EAAE,sBAAsB;QAC3C,kCAAkC;KACnC,CAAC;IAC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C9C,OAAO,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAC;AAClD,CAAC","sourcesContent":["import { CONFIG_VALIDATION } from '../../constants/error-messages';\nimport { logger } from '../../logger';\nimport { ExternalHostError } from '../../types/errors/external-host-error';\nimport { getEnv } from '../env';\nimport type { FileChange } from './types';\n\nexport function checkForPlatformFailure(err: Error): Error | null {\n if (getEnv().NODE_ENV === 'test') {\n return null;\n }\n const externalHostFailureStrings = [\n 'remote: Invalid username or password',\n 'gnutls_handshake() failed',\n 'The requested URL returned error: 403',\n 'The requested URL returned error: 5',\n 'The remote end hung up unexpectedly',\n 'access denied or repository not exported',\n 'Could not write new index file',\n 'Failed to connect to',\n 'Connection timed out',\n 'malformed object name',\n 'Could not resolve host',\n 'early EOF',\n 'fatal: bad config', // .gitmodules problem\n 'expected flush after ref listing',\n ];\n for (const errorStr of externalHostFailureStrings) {\n if (err.message.includes(errorStr)) {\n logger.debug({ err }, 'Converting git error to ExternalHostError');\n return new ExternalHostError(err, 'git');\n }\n /* v8 ignore next -- TODO: add test */\n }\n\n /* v8 ignore next -- TODO: add test */\n const configErrorStrings = [\n {\n error: 'GitLab: Branch name does not follow the pattern',\n message:\n \"Cannot push because branch name does not follow project's push rules\",\n },\n {\n error: 'GitLab: Commit message does not follow the pattern',\n message:\n \"Cannot push because commit message does not follow project's push rules\",\n },\n {\n error: ' is not a member of team',\n message:\n 'The `Restrict commits to existing GitLab users` rule is blocking Renovate push. Check the Renovate `gitAuthor` setting',\n },\n {\n error: 'TF401027:',\n message:\n 'You need the Git `GenericContribute` permission to perform this action',\n },\n {\n error: 'matches more than one',\n message:\n \"Renovate cannot push branches if there are tags with names the same as Renovate's branches. Please remove conflicting tag names or change Renovate's branchPrefix to avoid conflicts.\",\n },\n ];\n /* v8 ignore next -- TODO: add test */\n for (const { error, message } of configErrorStrings) {\n if (err.message.includes(error)) {\n logger.debug({ err }, 'Converting git error to CONFIG_VALIDATION error');\n const res = new Error(CONFIG_VALIDATION);\n res.validationError = message;\n res.validationMessage = `\\`${err.message.replaceAll('`', \"'\")}\\``;\n return res;\n }\n }\n\n /* v8 ignore next -- TODO: add test */\n return null;\n}\n\n/* v8 ignore next -- TODO: add tests */\nexport function handleCommitError(\n err: Error,\n branchName: string,\n files?: FileChange[],\n): null {\n checkForPlatformFailure(err);\n if (err.message.includes(`'refs/heads/renovate' exists`)) {\n const error = new Error(CONFIG_VALIDATION);\n error.validationSource = 'None';\n error.validationError = 'An existing branch is blocking Renovate';\n error.validationMessage = `Renovate needs to create the branch \\`${branchName}\\` but is blocked from doing so because of an existing branch called \\`renovate\\`. Please remove it so that Renovate can proceed.`;\n throw error;\n }\n if (\n err.message.includes(\n 'refusing to allow a GitHub App to create or update workflow',\n )\n ) {\n logger.warn(\n 'App has not been granted permissions to update Workflows - aborting branch.',\n );\n return null;\n }\n if (\n (err.message.includes('remote rejected') || err.message.includes('403')) &&\n files?.some((file) => file.path?.startsWith('.github/workflows/'))\n ) {\n logger.debug({ err }, 'commitFiles error');\n logger.info('Workflows update rejection - aborting branch.');\n return null;\n }\n if (err.message.includes('protected branch hook declined')) {\n const error = new Error(CONFIG_VALIDATION);\n error.validationSource = branchName;\n error.validationError = 'Renovate branch is protected';\n error.validationMessage = `Renovate cannot push to its branch because branch protection has been enabled.`;\n throw error;\n }\n if (err.message.includes('can only push your own commits')) {\n const error = new Error(CONFIG_VALIDATION);\n error.validationSource = branchName;\n error.validationError = 'Bitbucket committer error';\n error.validationMessage = `Renovate has experienced the following error when attempting to push its branch to the server: \\`${err.message.replaceAll(\n '`',\n \"'\",\n )}\\``;\n throw error;\n }\n if (err.message.includes('remote: error: cannot lock ref')) {\n logger.error({ err }, 'Error committing files.');\n return null;\n }\n if (\n err.message.includes('denying non-fast-forward') ||\n err.message.includes('GH003: Sorry, force-pushing')\n ) {\n logger.debug({ err }, 'Permission denied to update branch');\n const error = new Error(CONFIG_VALIDATION);\n error.validationSource = branchName;\n error.validationError = 'Force push denied';\n error.validationMessage = `Renovate is unable to update branch(es) due to force pushes being disallowed.`;\n throw error;\n }\n logger.debug({ err }, 'Unknown error committing files');\n // We don't know why this happened, so this will cause bubble up to a branch error\n throw err;\n}\n\nexport function bulkChangesDisallowed(err: Error): boolean {\n return err.message.includes('update more than');\n}\n"]}
|
package/dist/util/git/index.js
CHANGED
|
@@ -130,7 +130,7 @@ async function getDefaultBranch(git) {
|
|
|
130
130
|
// see https://stackoverflow.com/a/62352647/3005034
|
|
131
131
|
try {
|
|
132
132
|
let res = await git.raw(['rev-parse', '--abbrev-ref', 'origin/HEAD']);
|
|
133
|
-
/* v8 ignore
|
|
133
|
+
/* v8 ignore next -- TODO: add test */
|
|
134
134
|
if (!res) {
|
|
135
135
|
logger_1.logger.debug('Could not determine default branch using git rev-parse');
|
|
136
136
|
const headPrefix = 'HEAD branch: ';
|
|
@@ -140,9 +140,8 @@ async function getDefaultBranch(git) {
|
|
|
140
140
|
.find((line) => line.startsWith(headPrefix))
|
|
141
141
|
.replace(headPrefix, '');
|
|
142
142
|
}
|
|
143
|
-
/* v8 ignore stop */
|
|
144
143
|
return res.replace('origin/', '').trim();
|
|
145
|
-
/* v8 ignore
|
|
144
|
+
/* v8 ignore next -- TODO: add test */
|
|
146
145
|
}
|
|
147
146
|
catch (err) {
|
|
148
147
|
logger_1.logger.debug({ err }, 'Error getting default branch');
|
|
@@ -159,7 +158,6 @@ async function getDefaultBranch(git) {
|
|
|
159
158
|
}
|
|
160
159
|
throw err;
|
|
161
160
|
}
|
|
162
|
-
/* v8 ignore stop */
|
|
163
161
|
}
|
|
164
162
|
let config = {};
|
|
165
163
|
// TODO: can be undefined
|
|
@@ -389,7 +387,7 @@ async function syncGit() {
|
|
|
389
387
|
const durationMs = Math.round(Date.now() - fetchStart);
|
|
390
388
|
logger_1.logger.info({ durationMs }, 'git fetch completed');
|
|
391
389
|
clone = false;
|
|
392
|
-
/* v8 ignore next
|
|
390
|
+
/* v8 ignore next -- TODO: add test */
|
|
393
391
|
}
|
|
394
392
|
catch (err) {
|
|
395
393
|
if (err.message === error_messages_1.REPOSITORY_EMPTY) {
|
|
@@ -439,7 +437,7 @@ async function syncGit() {
|
|
|
439
437
|
}
|
|
440
438
|
try {
|
|
441
439
|
config.currentBranchSha = (await git.raw(['rev-parse', 'HEAD'])).trim();
|
|
442
|
-
/* v8 ignore next
|
|
440
|
+
/* v8 ignore next -- TODO: add test */
|
|
443
441
|
}
|
|
444
442
|
catch (err) {
|
|
445
443
|
if (err.message?.includes('fatal: not a git repository')) {
|
|
@@ -452,7 +450,7 @@ async function syncGit() {
|
|
|
452
450
|
try {
|
|
453
451
|
const latestCommit = (await git.log({ n: 1 })).latest;
|
|
454
452
|
logger_1.logger.debug({ latestCommit }, 'latest repository commit');
|
|
455
|
-
/* v8 ignore next
|
|
453
|
+
/* v8 ignore next -- TODO: add test */
|
|
456
454
|
}
|
|
457
455
|
catch (err) {
|
|
458
456
|
const errChecked = (0, error_1.checkForPlatformFailure)(err);
|
|
@@ -749,7 +747,7 @@ async function isBranchConflicted(baseBranch, branch) {
|
|
|
749
747
|
}
|
|
750
748
|
catch (err) {
|
|
751
749
|
result = true;
|
|
752
|
-
/* v8 ignore next
|
|
750
|
+
/* v8 ignore next -- TODO: add test */
|
|
753
751
|
if (!err?.git?.conflicts?.length) {
|
|
754
752
|
logger_1.logger.debug({ baseBranch, branch, err }, 'isBranchConflicted: unknown error');
|
|
755
753
|
}
|
|
@@ -760,7 +758,7 @@ async function isBranchConflicted(baseBranch, branch) {
|
|
|
760
758
|
if (origBranch !== baseBranch) {
|
|
761
759
|
await git.checkout(origBranch);
|
|
762
760
|
}
|
|
763
|
-
/* v8 ignore next
|
|
761
|
+
/* v8 ignore next -- TODO: add test */
|
|
764
762
|
}
|
|
765
763
|
catch (err) {
|
|
766
764
|
logger_1.logger.debug({ baseBranch, branch, err }, 'isBranchConflicted: cleanup error');
|
|
@@ -1120,7 +1118,7 @@ async function commitFiles(commitConfig) {
|
|
|
1120
1118
|
}
|
|
1121
1119
|
}
|
|
1122
1120
|
return null;
|
|
1123
|
-
/* v8 ignore next
|
|
1121
|
+
/* v8 ignore next -- TODO: add test */
|
|
1124
1122
|
}
|
|
1125
1123
|
catch (err) {
|
|
1126
1124
|
if (err.message.includes('[rejected] (stale info)')) {
|
|
@@ -1322,9 +1320,9 @@ async function getRemotes() {
|
|
|
1322
1320
|
logger_1.logger.debug(`Found remotes: ${remotes.map((r) => r.name).join(', ')}`);
|
|
1323
1321
|
return remotes.map((remote) => remote.name);
|
|
1324
1322
|
}
|
|
1325
|
-
catch (err) /* v8 ignore
|
|
1323
|
+
catch (err) /* v8 ignore next */ {
|
|
1326
1324
|
logger_1.logger.error({ err }, 'Error getting remotes');
|
|
1327
1325
|
throw err;
|
|
1328
|
-
}
|
|
1326
|
+
}
|
|
1329
1327
|
}
|
|
1330
1328
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/util/git/index.ts"],"names":[],"mappings":";;;AAyEA,4BAyCC;AA6DD,gDA0BC;AAwCD,oCAEC;AAED,4BAcC;AAWD,sCAGC;AAiBD,oCAaC;AAED,wCA4BC;AAED,8CAMC;AAED,sCAmBC;AAED,0CA4BC;AAED,4BAEC;AAED,0BAqIC;AAED,sCAeC;AAED,oCAEC;AAGD,0CAEC;AAED,8CAeC;AAED,wCAsCC;AAED,4DA6BC;AAED,kDAUC;AAED,8CAWC;AAED,kCA2BC;AAED,sCAEC;AAED,gDAuCC;AAED,4CA8FC;AAED,gDAsEC;AAED,oCAgCC;AAED,oCA6BC;AAED,kCAkCC;AAED,0DAeC;AAED,wCAEC;AAED,4DAIC;AAsBD,0BAkBC;AAED,4BAUC;AAED,0BAYC;AAuBD,sCAiIC;AAED,gCAiCC;AAED,kCAgBC;AAED,kCA0BC;AAED,wBAwBC;AAYD,0DAQC;AAyBD,8CA+CC;AA8BD,wCAkBC;AAsBD,oDAyBC;AAED,gC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,8BAAsB,CAAC,CAAC;QACrE,CAAC;QACD,MAAM,mBAAmB,CAAC,GAAG,8BAAsB,IAAI,UAAU,EAAE,CAAC,CAAC;QACrE,MAAM,iBAAiB,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;IAChD,CAAC;IAAC,OAAO,GAAG,EAAE,0CAA0C,CAAC,CAAC;QACxD,eAAM,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,EAAE,0BAA0B,CAAC,CAAC;QAClD,MAAM,IAAI,KAAK,CAAC,8BAAa,CAAC,CAAC;IACjC,CAAC;AACH,CAAC;AAEM,KAAK,UAAU,UAAU;IAC9B,eAAM,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC;IACjC,IAAI,CAAC;QACH,MAAM,OAAO,EAAE,CAAC;QAChB,MAAM,OAAO,GAAG,MAAM,GAAG,CAAC,UAAU,EAAE,CAAC;QACvC,eAAM,CAAC,KAAK,CAAC,kBAAkB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACxE,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC9C,CAAC;IAAC,OAAO,GAAG,EAAE,qBAAqB,CAAC,CAAC;QACnC,eAAM,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,EAAE,uBAAuB,CAAC,CAAC;QAC/C,MAAM,GAAG,CAAC;IACZ,CAAC,CAAC,oBAAoB;AACxB,CAAC","sourcesContent":["import URL from 'node:url';\nimport { setTimeout } from 'timers/promises';\nimport { isBoolean, isNonEmptyObject, isString } from '@sindresorhus/is';\nimport fs from 'fs-extra';\nimport semver from 'semver';\nimport type { Options, SimpleGit, TaskOptions } from 'simple-git';\nimport { ResetMode, simpleGit } from 'simple-git';\nimport upath from 'upath';\nimport { getConfigFileNames } from '../../config/app-strings';\nimport { GlobalConfig } from '../../config/global';\nimport type { RenovateConfig } from '../../config/types';\nimport {\n CONFIG_VALIDATION,\n INVALID_PATH,\n REPOSITORY_CHANGED,\n REPOSITORY_DISABLED,\n REPOSITORY_EMPTY,\n SYSTEM_INSUFFICIENT_DISK_SPACE,\n TEMPORARY_ERROR,\n UNKNOWN_ERROR,\n} from '../../constants/error-messages';\nimport { logger } from '../../logger';\nimport { ExternalHostError } from '../../types/errors/external-host-error';\nimport type { GitProtocol } from '../../types/git';\nimport { incLimitedValue } from '../../workers/global/limits';\nimport { getCache } from '../cache/repository';\nimport { getEnv } from '../env';\nimport { getChildEnv } from '../exec/utils';\nimport { newlineRegex, regEx } from '../regex';\nimport { matchRegexOrGlobList } from '../string-match';\nimport { getGitEnvironmentVariables } from './auth';\nimport { parseGitAuthor } from './author';\nimport {\n getCachedBehindBaseResult,\n setCachedBehindBaseResult,\n} from './behind-base-branch-cache';\nimport { getNoVerify, simpleGitConfig } from './config';\nimport {\n getCachedConflictResult,\n setCachedConflictResult,\n} from './conflicts-cache';\nimport {\n bulkChangesDisallowed,\n checkForPlatformFailure,\n handleCommitError,\n} from './error';\nimport {\n getCachedModifiedResult,\n setCachedModifiedResult,\n} from './modified-cache';\nimport { configSigningKey, writePrivateKey } from './private-key';\nimport type {\n CommitFilesConfig,\n CommitResult,\n LocalConfig,\n LongCommitSha,\n PushFilesConfig,\n StatusResult,\n StorageConfig,\n TreeItem,\n} from './types';\n\nexport { setNoVerify } from './config';\nexport { setPrivateKey } from './private-key';\n\n// Retry parameters\nconst retryCount = 5;\nconst delaySeconds = 3;\nconst delayFactor = 2;\n\nexport const RENOVATE_FORK_UPSTREAM = 'renovate-fork-upstream';\n\n// A generic wrapper for simpleGit.* calls to make them more fault-tolerant\nexport async function gitRetry<T>(gitFunc: () => Promise<T>): Promise<T> {\n let round = 0;\n let lastError: Error | undefined;\n\n while (round <= retryCount) {\n if (round > 0) {\n logger.debug(`gitRetry round ${round}`);\n }\n try {\n const res = await gitFunc();\n if (round > 1) {\n logger.debug('Successful retry of git function');\n }\n return res;\n } catch (err) {\n lastError = err;\n logger.debug({ err }, `Git function thrown`);\n // Try to transform the Error to ExternalHostError\n const errChecked = checkForPlatformFailure(err);\n if (errChecked instanceof ExternalHostError) {\n logger.debug(\n { err: errChecked },\n `ExternalHostError thrown in round ${\n round + 1\n } of ${retryCount} - retrying in the next round`,\n );\n } else {\n throw err;\n }\n }\n\n const nextDelay = delayFactor ^ ((round - 1) * delaySeconds);\n logger.trace({ nextDelay }, `Delay next round`);\n await setTimeout(1000 * nextDelay);\n\n round++;\n }\n\n // Can't be `undefined` here.\n // eslint-disable-next-line @typescript-eslint/only-throw-error\n throw lastError;\n}\n\nasync function isDirectory(dir: string): Promise<boolean> {\n try {\n return (await fs.stat(dir)).isDirectory();\n } catch {\n return false;\n }\n}\n\nasync function getDefaultBranch(git: SimpleGit): Promise<string> {\n logger.debug('getDefaultBranch()');\n // see https://stackoverflow.com/a/62352647/3005034\n try {\n let res = await git.raw(['rev-parse', '--abbrev-ref', 'origin/HEAD']);\n /* v8 ignore start -- TODO: add test */\n if (!res) {\n logger.debug('Could not determine default branch using git rev-parse');\n const headPrefix = 'HEAD branch: ';\n res = (await git.raw(['remote', 'show', 'origin']))\n .split('\\n')\n .map((line) => line.trim())\n .find((line) => line.startsWith(headPrefix))!\n .replace(headPrefix, '');\n }\n /* v8 ignore stop */\n return res.replace('origin/', '').trim();\n /* v8 ignore start -- TODO: add test */\n } catch (err) {\n logger.debug({ err }, 'Error getting default branch');\n const errChecked = checkForPlatformFailure(err);\n if (errChecked) {\n throw errChecked;\n }\n if (\n err.message.startsWith(\n 'fatal: ref refs/remotes/origin/HEAD is not a symbolic ref',\n )\n ) {\n throw new Error(REPOSITORY_EMPTY);\n }\n if (err.message.includes(\"fatal: ambiguous argument 'origin/HEAD'\")) {\n logger.warn('Error getting default branch');\n throw new Error(TEMPORARY_ERROR);\n }\n throw err;\n }\n /* v8 ignore stop */\n}\n\nlet config: LocalConfig = {} as any;\n\n// TODO: can be undefined\nlet git: SimpleGit;\nlet gitInitialized: boolean;\nlet submodulesInitizialized: boolean;\n\nlet privateKeySet = false;\n\nexport const GIT_MINIMUM_VERSION = '2.33.0'; // git show-current\n\nexport async function validateGitVersion(): Promise<boolean> {\n let version: string | undefined;\n const globalGit = simpleGit();\n try {\n const { major, minor, patch, installed } = await globalGit.version();\n /* v8 ignore next 4 -- TODO: add test */\n if (!installed) {\n logger.error('Git not installed');\n return false;\n }\n version = `${major}.${minor}.${patch}`;\n /* v8 ignore next 4 */\n } catch (err) {\n logger.error({ err }, 'Error fetching git version');\n return false;\n }\n /* v8 ignore next 7 -- TODO: add test */\n if (!(version && semver.gte(version, GIT_MINIMUM_VERSION))) {\n logger.error(\n { detectedVersion: version, minimumVersion: GIT_MINIMUM_VERSION },\n 'Git version needs upgrading',\n );\n return false;\n }\n logger.debug(`Found valid git version: ${version}`);\n return true;\n}\n\nasync function fetchBranchCommits(preferUpstream = true): Promise<void> {\n config.branchCommits = {};\n const url =\n preferUpstream && config.upstreamUrl ? config.upstreamUrl : config.url;\n logger.debug(`fetchBranchCommits(): url=${url}`);\n const opts = ['ls-remote', '--heads', url];\n if (config.extraCloneOpts) {\n Object.entries(config.extraCloneOpts).forEach((e) =>\n // TODO: types (#22198)\n opts.unshift(e[0], `${e[1]!}`),\n );\n }\n try {\n const lsRemoteRes = await gitRetry(() => git.raw(opts));\n logger.trace({ lsRemoteRes }, 'git ls-remote result');\n lsRemoteRes\n .split(newlineRegex)\n .filter(Boolean)\n .map((line) => line.trim().split(regEx(/\\s+/)))\n .forEach(([sha, ref]) => {\n config.branchCommits[ref.replace('refs/heads/', '')] =\n sha as LongCommitSha;\n });\n logger.trace({ branchCommits: config.branchCommits }, 'branch commits');\n /* v8 ignore next 11 -- TODO: add test */\n } catch (err) {\n const errChecked = checkForPlatformFailure(err);\n if (errChecked) {\n throw errChecked;\n }\n logger.debug({ err }, 'git error');\n if (err.message?.includes('Please ask the owner to check their account')) {\n throw new Error(REPOSITORY_DISABLED);\n }\n throw err;\n }\n}\n\nexport async function fetchRevSpec(revSpec: string): Promise<void> {\n await gitRetry(() => git.fetch(['origin', revSpec]));\n}\n\nexport async function initRepo(args: StorageConfig): Promise<void> {\n config = { ...args } as any;\n config.ignoredAuthors = [];\n config.additionalBranches = [];\n config.branchIsModified = {};\n // TODO: safe to pass all env variables? use `getChildEnv` instead?\n git = simpleGit(GlobalConfig.get('localDir'), simpleGitConfig()).env({\n ...getEnv(),\n LANG: 'C.UTF-8',\n LC_ALL: 'C.UTF-8',\n });\n gitInitialized = false;\n submodulesInitizialized = false;\n await fetchBranchCommits();\n}\n\nasync function resetToBranch(branchName: string): Promise<void> {\n logger.debug(`resetToBranch(${branchName})`);\n await git.raw(['reset', '--hard']);\n await gitRetry(() => git.checkout(branchName));\n await git.raw(['reset', '--hard', 'origin/' + branchName]);\n await git.raw(['clean', '-fd']);\n}\n\n/* v8 ignore next 4 -- TODO: add test */\nexport async function resetToCommit(commit: LongCommitSha): Promise<void> {\n logger.debug(`resetToCommit(${commit})`);\n await git.raw(['reset', '--hard', commit]);\n}\n\nasync function deleteLocalBranch(branchName: string): Promise<void> {\n await git.branch(['-D', branchName]);\n}\n\nasync function cleanLocalBranches(): Promise<void> {\n const existingBranches = (await git.raw(['branch']))\n .split(newlineRegex)\n .map((branch) => branch.trim())\n .filter((branch) => branch.length > 0 && !branch.startsWith('* '));\n logger.debug({ existingBranches });\n for (const branchName of existingBranches) {\n await deleteLocalBranch(branchName);\n }\n}\n\nexport function setGitAuthor(gitAuthor: string | undefined): void {\n const gitAuthorParsed = parseGitAuthor(\n gitAuthor ?? 'Renovate Bot <renovate@whitesourcesoftware.com>',\n );\n if (!gitAuthorParsed) {\n const error = new Error(CONFIG_VALIDATION);\n error.validationSource = 'None';\n error.validationError = 'Invalid gitAuthor';\n error.validationMessage = `\\`gitAuthor\\` is not parsed as valid RFC5322 format: \\`${gitAuthor!}\\``;\n throw error;\n }\n config.gitAuthorName = gitAuthorParsed.name;\n config.gitAuthorEmail = gitAuthorParsed.address;\n}\n\nexport async function writeGitAuthor(): Promise<void> {\n const { gitAuthorName, gitAuthorEmail, writeGitDone } = config;\n /* v8 ignore next 3 -- TODO: add test */\n if (writeGitDone) {\n return;\n }\n config.writeGitDone = true;\n try {\n if (gitAuthorName) {\n logger.debug(`Setting git author name: ${gitAuthorName}`);\n await git.addConfig('user.name', gitAuthorName);\n }\n if (gitAuthorEmail) {\n logger.debug(`Setting git author email: ${gitAuthorEmail}`);\n await git.addConfig('user.email', gitAuthorEmail);\n }\n /* v8 ignore next 11 -- TODO: add test */\n } catch (err) {\n const errChecked = checkForPlatformFailure(err);\n if (errChecked) {\n throw errChecked;\n }\n logger.debug(\n { err, gitAuthorName, gitAuthorEmail },\n 'Error setting git author config',\n );\n throw new Error(TEMPORARY_ERROR);\n }\n}\n\nexport function setUserRepoConfig({\n gitIgnoredAuthors,\n gitAuthor,\n}: RenovateConfig): void {\n config.ignoredAuthors = gitIgnoredAuthors ?? [];\n setGitAuthor(gitAuthor);\n}\n\nexport async function getSubmodules(): Promise<string[]> {\n try {\n return (\n (await git.raw([\n 'config',\n '--file',\n '.gitmodules',\n '--get-regexp',\n '\\\\.path',\n ])) || ''\n )\n .trim()\n .split(regEx(/[\\n\\s]/))\n .filter((_e: string, i: number) => i % 2);\n /* v8 ignore next 4 -- TODO: add test */\n } catch (err) {\n logger.warn({ err }, 'Error getting submodules');\n return [];\n }\n}\n\nexport async function cloneSubmodules(\n shouldClone: boolean,\n cloneSubmodulesFilter: string[] | undefined,\n): Promise<void> {\n if (!shouldClone || submodulesInitizialized) {\n return;\n }\n submodulesInitizialized = true;\n const gitEnv = getChildEnv({ env: getGitEnvironmentVariables() });\n await syncGit();\n const submodules = await getSubmodules();\n for (const submodule of submodules) {\n if (!matchRegexOrGlobList(submodule, cloneSubmodulesFilter ?? ['*'])) {\n logger.debug(\n { cloneSubmodulesFilter },\n `Skipping submodule ${submodule}`,\n );\n continue;\n }\n try {\n logger.debug(`Cloning git submodule at ${submodule}`);\n await gitRetry(() =>\n git.env(gitEnv).submoduleUpdate(['--init', '--recursive', submodule]),\n );\n } catch (err) {\n logger.warn({ err, submodule }, `Unable to initialise git submodule`);\n }\n }\n}\n\nexport function isCloned(): boolean {\n return gitInitialized;\n}\n\nexport async function syncGit(): Promise<void> {\n if (gitInitialized) {\n /* v8 ignore next 3 -- TODO: add test */\n if (getEnv().RENOVATE_X_CLEAR_HOOKS) {\n await git.raw(['config', 'core.hooksPath', '/dev/null']);\n }\n return;\n }\n /* v8 ignore next 3 -- failsafe TODO: add test */\n if (GlobalConfig.get('platform') === 'local') {\n throw new Error('Cannot sync git when platform=local');\n }\n gitInitialized = true;\n const localDir = GlobalConfig.get('localDir')!;\n logger.debug(`syncGit(): Initializing git repository into ${localDir}`);\n const gitHead = upath.join(localDir, '.git/HEAD');\n let clone = true;\n\n if (await fs.pathExists(gitHead)) {\n logger.debug(\n `syncGit(): Found existing git repository, attempting git fetch`,\n );\n try {\n await git.raw(['remote', 'set-url', 'origin', config.url]);\n const fetchStart = Date.now();\n await gitRetry(() => git.fetch(['--prune', 'origin']));\n config.currentBranch =\n config.currentBranch || (await getDefaultBranch(git));\n await resetToBranch(config.currentBranch);\n await cleanLocalBranches();\n const durationMs = Math.round(Date.now() - fetchStart);\n logger.info({ durationMs }, 'git fetch completed');\n clone = false;\n /* v8 ignore next 6 -- TODO: add test */\n } catch (err) {\n if (err.message === REPOSITORY_EMPTY) {\n throw err;\n }\n logger.info({ err }, 'git fetch error, falling back to git clone');\n }\n }\n if (clone) {\n const cloneStart = Date.now();\n try {\n const opts: string[] = [];\n if (config.defaultBranch) {\n opts.push('-b', config.defaultBranch);\n }\n if (config.fullClone) {\n logger.debug('Performing full clone');\n } else {\n logger.debug('Performing blobless clone');\n opts.push('--filter=blob:none');\n }\n if (config.extraCloneOpts) {\n Object.entries(config.extraCloneOpts).forEach((e) =>\n // TODO: types (#22198)\n opts.push(e[0], `${e[1]!}`),\n );\n }\n const emptyDirAndClone = async (): Promise<void> => {\n await fs.emptyDir(localDir);\n await git.clone(config.url, '.', opts);\n };\n await gitRetry(() => emptyDirAndClone());\n /* v8 ignore next 10 -- TODO: add test */\n } catch (err) {\n logger.debug({ err }, 'git clone error');\n if (err.message?.includes('No space left on device')) {\n throw new Error(SYSTEM_INSUFFICIENT_DISK_SPACE);\n }\n if (err.message === REPOSITORY_EMPTY) {\n throw err;\n }\n throw new ExternalHostError(err, 'git');\n }\n const durationMs = Math.round(Date.now() - cloneStart);\n logger.debug({ durationMs }, 'git clone completed');\n }\n try {\n config.currentBranchSha = (\n await git.raw(['rev-parse', 'HEAD'])\n ).trim() as LongCommitSha;\n /* v8 ignore next 6 -- TODO: add test */\n } catch (err) {\n if (err.message?.includes('fatal: not a git repository')) {\n throw new Error(REPOSITORY_CHANGED);\n }\n throw err;\n }\n // This will only happen now if set in global config\n await cloneSubmodules(!!config.cloneSubmodules, config.cloneSubmodulesFilter);\n try {\n const latestCommit = (await git.log({ n: 1 })).latest;\n logger.debug({ latestCommit }, 'latest repository commit');\n /* v8 ignore next 10 -- TODO: add test */\n } catch (err) {\n const errChecked = checkForPlatformFailure(err);\n if (errChecked) {\n throw errChecked;\n }\n if (err.message.includes('does not have any commits yet')) {\n throw new Error(REPOSITORY_EMPTY);\n }\n logger.warn({ err }, 'Cannot retrieve latest commit');\n }\n config.currentBranch =\n config.currentBranch ??\n config.defaultBranch ??\n (await getDefaultBranch(git));\n /* v8 ignore next -- TODO: add test */\n delete getCache()?.semanticCommits;\n\n // If upstreamUrl is set then the bot is running in fork mode\n // The \"upstream\" remote is the original repository which was forked from\n if (config.upstreamUrl) {\n logger.debug(\n `Bringing default branch up-to-date with ${RENOVATE_FORK_UPSTREAM}, to get latest config`,\n );\n // Add remote if it does not exist\n const remotes = await git.getRemotes(true);\n if (!remotes.some((remote) => remote.name === RENOVATE_FORK_UPSTREAM)) {\n logger.debug(`Adding remote ${RENOVATE_FORK_UPSTREAM}`);\n await git.addRemote(RENOVATE_FORK_UPSTREAM, config.upstreamUrl);\n }\n await syncForkWithUpstream(config.currentBranch);\n await fetchBranchCommits(false);\n }\n\n config.currentBranchSha = (\n await git.revparse('HEAD')\n ).trim() as LongCommitSha;\n logger.debug(`Current branch SHA: ${config.currentBranchSha}`);\n}\n\nexport async function getRepoStatus(path?: string): Promise<StatusResult> {\n if (isString(path)) {\n const localDir = GlobalConfig.get('localDir');\n const localPath = upath.resolve(localDir, path);\n if (!localPath.startsWith(upath.resolve(localDir))) {\n logger.warn(\n { localPath, localDir },\n 'Preventing access to file outside the local directory',\n );\n throw new Error(INVALID_PATH);\n }\n }\n\n await syncGit();\n return git.status(path ? [path] : []);\n}\n\nexport function branchExists(branchName: string): boolean {\n return !!config.branchCommits[branchName];\n}\n\n// Return the commit SHA for a branch\nexport function getBranchCommit(branchName: string): LongCommitSha | null {\n return config.branchCommits?.[branchName] || null;\n}\n\nexport async function getCommitMessages(): Promise<string[]> {\n logger.debug('getCommitMessages');\n if (GlobalConfig.get('platform') !== 'local') {\n await syncGit();\n }\n try {\n const res = await git.log({\n n: 20,\n format: { message: '%s' },\n });\n return res.all.map((commit) => commit.message);\n /* v8 ignore next 3 -- TODO: add test */\n } catch {\n return [];\n }\n}\n\nexport async function checkoutBranch(\n branchName: string,\n): Promise<LongCommitSha> {\n logger.debug(`Setting current branch to ${branchName}`);\n await syncGit();\n try {\n await gitRetry(() =>\n git.checkout(\n submodulesInitizialized\n ? ['-f', '--recurse-submodules', branchName, '--']\n : ['-f', branchName, '--'],\n ),\n );\n config.currentBranch = branchName;\n config.currentBranchSha = (\n await git.raw(['rev-parse', 'HEAD'])\n ).trim() as LongCommitSha;\n const latestCommitDate = (await git.log({ n: 1 }))?.latest?.date;\n if (latestCommitDate) {\n logger.debug(\n { branchName, latestCommitDate, sha: config.currentBranchSha },\n 'latest commit',\n );\n }\n await git.reset(ResetMode.HARD);\n return config.currentBranchSha;\n /* v8 ignore next 11 -- TODO: add test */\n } catch (err) {\n const errChecked = checkForPlatformFailure(err);\n if (errChecked) {\n throw errChecked;\n }\n if (err.message?.includes('fatal: ambiguous argument')) {\n logger.warn({ err }, 'Failed to checkout branch');\n throw new Error(TEMPORARY_ERROR);\n }\n throw err;\n }\n}\n\nexport async function checkoutBranchFromRemote(\n branchName: string,\n remoteName: string,\n): Promise<LongCommitSha> {\n logger.debug(`Checking out branch ${branchName} from remote ${remoteName}`);\n await syncGit();\n try {\n await gitRetry(() =>\n git.checkoutBranch(branchName, `${remoteName}/${branchName}`),\n );\n config.currentBranch = branchName;\n config.currentBranchSha = (\n await git.revparse('HEAD')\n ).trim() as LongCommitSha;\n logger.debug(`Checked out branch ${branchName} from remote ${remoteName}`);\n config.branchCommits[branchName] = config.currentBranchSha;\n return config.currentBranchSha;\n } catch (err) {\n const errChecked = checkForPlatformFailure(err);\n /* v8 ignore next 3 -- hard to test */\n if (errChecked) {\n throw errChecked;\n }\n if (err.message?.includes('fatal: ambiguous argument')) {\n logger.warn({ err }, 'Failed to checkout branch');\n throw new Error(TEMPORARY_ERROR);\n }\n throw err;\n }\n}\n\nexport async function resetHardFromRemote(\n remoteAndBranch: string,\n): Promise<void> {\n try {\n const resetLog = await git.reset(['--hard', remoteAndBranch]);\n logger.debug({ resetLog }, 'git reset log');\n } catch (err) {\n logger.error({ err }, 'Error during git reset --hard');\n throw err;\n }\n}\n\nexport async function forcePushToRemote(\n branchName: string,\n remote: string,\n): Promise<void> {\n try {\n const pushLog = await git.push([remote, branchName, '--force']);\n logger.debug({ pushLog }, 'git push log');\n } catch (err) {\n logger.error({ err }, 'Error during git push --force');\n throw err;\n }\n}\n\nexport async function getFileList(): Promise<string[]> {\n await syncGit();\n const branch = config.currentBranch;\n let files: string;\n try {\n files = await git.raw(['ls-tree', '-r', `refs/heads/${branch}`]);\n /* v8 ignore next 10 -- TODO: add test */\n } catch (err) {\n if (err.message?.includes('fatal: Not a valid object name')) {\n logger.debug(\n { err },\n 'Branch not found when checking branch list - aborting',\n );\n throw new Error(REPOSITORY_CHANGED);\n }\n throw err;\n }\n /* v8 ignore next 3 -- TODO: add test */\n if (!files) {\n return [];\n }\n // submodules are starting with `160000 commit`\n return files\n .split(newlineRegex)\n .filter(isString)\n .filter((line) => line.startsWith('100'))\n .map((line) => line.split(regEx(/\\t/)).pop()!);\n}\n\nexport function getBranchList(): string[] {\n return Object.keys(config.branchCommits ?? {});\n}\n\nexport async function isBranchBehindBase(\n branchName: string,\n baseBranch: string,\n): Promise<boolean> {\n const baseBranchSha = getBranchCommit(baseBranch);\n const branchSha = getBranchCommit(branchName);\n let isBehind = getCachedBehindBaseResult(\n branchName,\n branchSha,\n baseBranch,\n baseBranchSha,\n );\n if (isBehind !== null) {\n logger.debug(`branch.isBehindBase(): using cached result \"${isBehind}\"`);\n return isBehind;\n }\n\n logger.debug('branch.isBehindBase(): using git to calculate');\n\n await syncGit();\n try {\n const behindCount = (\n await git.raw(['rev-list', '--count', `${branchSha!}..${baseBranchSha!}`])\n ).trim();\n isBehind = behindCount !== '0';\n logger.debug(\n { baseBranch, branchName },\n `branch.isBehindBase(): ${isBehind}`,\n );\n setCachedBehindBaseResult(branchName, isBehind);\n return isBehind;\n /* v8 ignore next 7 -- TODO: add test */\n } catch (err) {\n const errChecked = checkForPlatformFailure(err);\n if (errChecked) {\n throw errChecked;\n }\n throw err;\n }\n}\n\nexport async function isBranchModified(\n branchName: string,\n baseBranch: string,\n): Promise<boolean> {\n if (!branchExists(branchName)) {\n logger.debug('branch.isModified(): no cache');\n return false;\n }\n // First check local config\n if (config.branchIsModified[branchName] !== undefined) {\n return config.branchIsModified[branchName];\n }\n // Second check repository cache\n const isModified = getCachedModifiedResult(\n branchName,\n getBranchCommit(branchName), // branch sha\n );\n if (isModified !== null) {\n logger.debug(`branch.isModified(): using cached result \"${isModified}\"`);\n config.branchIsModified[branchName] = isModified;\n return isModified;\n }\n\n logger.debug('branch.isModified(): using git to calculate');\n\n await syncGit();\n const committedAuthors = new Set<string>();\n try {\n const commits = await git.log([\n `origin/${baseBranch}..origin/${branchName}`,\n ]);\n\n for (const commit of commits.all) {\n committedAuthors.add(commit.author_email);\n }\n /* v8 ignore next 10 -- TODO: add test */\n } catch (err) {\n if (err.message?.includes('fatal: bad revision')) {\n logger.debug(\n { err },\n 'Remote branch not found when checking last commit author - aborting run',\n );\n throw new Error(REPOSITORY_CHANGED);\n }\n logger.warn({ err }, 'Error checking last author for isBranchModified');\n }\n const { gitAuthorEmail, ignoredAuthors } = config;\n\n const includedAuthors = new Set(committedAuthors);\n\n if (gitAuthorEmail) {\n includedAuthors.delete(gitAuthorEmail);\n }\n\n for (const ignoredAuthor of ignoredAuthors) {\n includedAuthors.delete(ignoredAuthor);\n }\n\n if (includedAuthors.size === 0) {\n // authors all match - branch has not been modified\n logger.trace(\n {\n branchName,\n baseBranch,\n committedAuthors: [...committedAuthors],\n includedAuthors: [...includedAuthors],\n gitAuthorEmail,\n ignoredAuthors,\n },\n 'branch.isModified() = false',\n );\n logger.debug('branch.isModified() = false');\n config.branchIsModified[branchName] = false;\n setCachedModifiedResult(branchName, false);\n return false;\n }\n logger.trace(\n {\n branchName,\n baseBranch,\n committedAuthors: [...committedAuthors],\n includedAuthors: [...includedAuthors],\n gitAuthorEmail,\n ignoredAuthors,\n },\n 'branch.isModified() = true',\n );\n logger.debug(\n { branchName, unrecognizedAuthors: [...includedAuthors] },\n 'branch.isModified() = true',\n );\n config.branchIsModified[branchName] = true;\n setCachedModifiedResult(branchName, true);\n return true;\n}\n\nexport async function isBranchConflicted(\n baseBranch: string,\n branch: string,\n): Promise<boolean> {\n logger.debug(`isBranchConflicted(${baseBranch}, ${branch})`);\n\n const baseBranchSha = getBranchCommit(baseBranch);\n const branchSha = getBranchCommit(branch);\n if (!baseBranchSha || !branchSha) {\n logger.warn(\n { baseBranch, branch },\n 'isBranchConflicted: branch does not exist',\n );\n return true;\n }\n\n const isConflicted = getCachedConflictResult(\n branch,\n branchSha,\n baseBranch,\n baseBranchSha,\n );\n if (isBoolean(isConflicted)) {\n logger.debug(\n `branch.isConflicted(): using cached result \"${isConflicted}\"`,\n );\n return isConflicted;\n }\n\n logger.debug('branch.isConflicted(): using git to calculate');\n\n let result = false;\n await syncGit();\n await writeGitAuthor();\n\n const origBranch = config.currentBranch;\n try {\n await git.reset(ResetMode.HARD);\n //TODO: see #18600\n if (origBranch !== baseBranch) {\n await git.checkout(baseBranch);\n }\n await git.merge(['--no-commit', '--no-ff', `origin/${branch}`]);\n } catch (err) {\n result = true;\n /* v8 ignore next 6 -- TODO: add test */\n if (!err?.git?.conflicts?.length) {\n logger.debug(\n { baseBranch, branch, err },\n 'isBranchConflicted: unknown error',\n );\n }\n } finally {\n try {\n await git.merge(['--abort']);\n if (origBranch !== baseBranch) {\n await git.checkout(origBranch);\n }\n /* v8 ignore next 6 -- TODO: add test */\n } catch (err) {\n logger.debug(\n { baseBranch, branch, err },\n 'isBranchConflicted: cleanup error',\n );\n }\n }\n\n setCachedConflictResult(branch, result);\n logger.debug(`branch.isConflicted(): ${result}`);\n return result;\n}\n\nexport async function deleteBranch(branchName: string): Promise<void> {\n await syncGit();\n try {\n const deleteCommand = ['push', '--delete', 'origin', branchName];\n\n if (getNoVerify().includes('push')) {\n deleteCommand.push('--no-verify');\n }\n\n await gitRetry(() => git.raw(deleteCommand));\n logger.debug(`Deleted remote branch: ${branchName}`);\n } catch (err) {\n const errChecked = checkForPlatformFailure(err);\n /* v8 ignore next 3 -- TODO: add test */\n if (errChecked) {\n throw errChecked;\n }\n logger.debug(`No remote branch to delete with name: ${branchName}`);\n }\n try {\n /* v8 ignore next 2 -- TODO: add test (always throws) */\n await deleteLocalBranch(branchName);\n logger.debug(`Deleted local branch: ${branchName}`);\n } catch (err) {\n const errChecked = checkForPlatformFailure(err);\n /* v8 ignore next 3 -- TODO: add test */\n if (errChecked) {\n throw errChecked;\n }\n logger.debug(`No local branch to delete with name: ${branchName}`);\n }\n delete config.branchCommits[branchName];\n}\n\nexport async function mergeToLocal(refSpecToMerge: string): Promise<void> {\n let status: StatusResult | undefined;\n try {\n await syncGit();\n await writeGitAuthor();\n await git.reset(ResetMode.HARD);\n await gitRetry(() =>\n git.checkout([\n '-B',\n config.currentBranch,\n 'origin/' + config.currentBranch,\n ]),\n );\n status = await git.status();\n await fetchRevSpec(refSpecToMerge);\n await gitRetry(() => git.merge(['FETCH_HEAD']));\n } catch (err) {\n logger.debug(\n {\n baseBranch: config.currentBranch,\n baseSha: config.currentBranchSha,\n refSpecToMerge,\n status,\n err,\n },\n 'mergeLocally error',\n );\n throw err;\n }\n}\n\nexport async function mergeBranch(branchName: string): Promise<void> {\n let status: StatusResult | undefined;\n try {\n await syncGit();\n await writeGitAuthor();\n await git.reset(ResetMode.HARD);\n await gitRetry(() =>\n git.checkout(['-B', branchName, 'origin/' + branchName]),\n );\n await gitRetry(() =>\n git.checkout([\n '-B',\n config.currentBranch,\n 'origin/' + config.currentBranch,\n ]),\n );\n status = await git.status();\n await gitRetry(() => git.merge(['--ff-only', branchName]));\n await gitRetry(() => git.push('origin', config.currentBranch));\n incLimitedValue('Commits');\n } catch (err) {\n logger.debug(\n {\n baseBranch: config.currentBranch,\n baseSha: config.currentBranchSha,\n branchName,\n branchSha: getBranchCommit(branchName),\n status,\n err,\n },\n 'mergeBranch error',\n );\n throw err;\n }\n}\n\nexport async function getBranchLastCommitTime(\n branchName: string,\n): Promise<Date> {\n await syncGit();\n try {\n const time = await git.show(['-s', '--format=%ai', 'origin/' + branchName]);\n return new Date(Date.parse(time));\n } catch (err) {\n const errChecked = checkForPlatformFailure(err);\n /* v8 ignore next 3 -- TODO: add test */\n if (errChecked) {\n throw errChecked;\n }\n return new Date();\n }\n}\n\nexport function getBranchFiles(branchName: string): Promise<string[] | null> {\n return getBranchFilesFromRef(`origin/${branchName}`);\n}\n\nexport function getBranchFilesFromCommit(\n referenceCommit: LongCommitSha,\n): Promise<string[] | null> {\n return getBranchFilesFromRef(referenceCommit);\n}\n\nasync function getBranchFilesFromRef(\n refName: string,\n): Promise<string[] | null> {\n await syncGit();\n try {\n const diff = await gitRetry(() =>\n git.diffSummary([refName, `${refName}^`]),\n );\n return diff.files.map((file) => file.file);\n /* v8 ignore next 8 -- TODO: add test */\n } catch (err) {\n logger.warn({ err }, 'getBranchFilesFromRef error');\n const errChecked = checkForPlatformFailure(err);\n if (errChecked) {\n throw errChecked;\n }\n return null;\n }\n}\n\nexport async function getFile(\n filePath: string,\n branchName?: string,\n): Promise<string | null> {\n await syncGit();\n try {\n const content = await git.show([\n 'origin/' + (branchName ?? config.currentBranch) + ':' + filePath,\n ]);\n return content;\n } catch (err) {\n const errChecked = checkForPlatformFailure(err);\n /* v8 ignore next 3 -- TODO: add test */\n if (errChecked) {\n throw errChecked;\n }\n return null;\n }\n}\n\nexport async function getFiles(\n fileNames: string[],\n): Promise<Record<string, string | null>> {\n const fileContentMap: Record<string, string | null> = {};\n\n for (const fileName of fileNames) {\n fileContentMap[fileName] = await getFile(fileName);\n }\n\n return fileContentMap;\n}\n\nexport async function hasDiff(\n sourceRef: string,\n targetRef: string,\n): Promise<boolean> {\n await syncGit();\n try {\n return (\n (await gitRetry(() => git.diff([sourceRef, targetRef, '--']))) !== ''\n );\n } catch {\n return true;\n }\n}\n\nasync function handleCommitAuth(localDir: string): Promise<void> {\n if (!privateKeySet) {\n await writePrivateKey();\n privateKeySet = true;\n }\n await configSigningKey(localDir);\n await writeGitAuthor();\n}\n\n/**\n *\n * Prepare local branch with commit\n *\n * 0. Hard reset\n * 1. Creates local branch with `origin/` prefix\n * 2. Perform `git add` (respecting mode) and `git remove` for each file\n * 3. Perform commit\n * 4. Check whether resulting commit is empty or not (due to .gitignore)\n * 5. If not empty, return commit info for further processing\n *\n */\nexport async function prepareCommit({\n branchName,\n files,\n message,\n force = false,\n}: CommitFilesConfig): Promise<CommitResult | null> {\n const localDir = GlobalConfig.get('localDir')!;\n await syncGit();\n logger.debug(`Preparing files for committing to branch ${branchName}`);\n await handleCommitAuth(localDir);\n try {\n await git.reset(ResetMode.HARD);\n await git.raw(['clean', '-fd']);\n const parentCommitSha = config.currentBranchSha;\n await gitRetry(() =>\n git.checkout(['-B', branchName, 'origin/' + config.currentBranch]),\n );\n const deletedFiles: string[] = [];\n const addedModifiedFiles: string[] = [];\n const ignoredFiles: string[] = [];\n for (const file of files) {\n const fileName = file.path;\n if (file.type === 'deletion') {\n try {\n await git.rm([fileName]);\n deletedFiles.push(fileName);\n /* v8 ignore next 8 -- TODO: add test */\n } catch (err) {\n const errChecked = checkForPlatformFailure(err);\n if (errChecked) {\n throw errChecked;\n }\n logger.trace({ err, fileName }, 'Cannot delete file');\n ignoredFiles.push(fileName);\n }\n } else {\n if (await isDirectory(upath.join(localDir, fileName))) {\n // This is usually a git submodule update\n logger.trace({ fileName }, 'Adding directory commit');\n } else if (file.contents === null) {\n continue;\n } else {\n let contents: Buffer;\n if (typeof file.contents === 'string') {\n contents = Buffer.from(file.contents);\n /* v8 ignore next 3 -- TODO: add test */\n } else {\n contents = file.contents;\n }\n // some file systems including Windows don't support the mode\n // so the index should be manually updated after adding the file\n if (file.isSymlink) {\n await fs.symlink(file.contents, upath.join(localDir, fileName));\n } else {\n await fs.outputFile(upath.join(localDir, fileName), contents, {\n mode: file.isExecutable ? 0o777 : 0o666,\n });\n }\n }\n try {\n /* v8 ignore next 2 -- TODO: add test */\n const addParams =\n fileName === getConfigFileNames()[0] ? ['-f', fileName] : fileName;\n await git.add(addParams);\n if (file.isExecutable) {\n await git.raw(['update-index', '--chmod=+x', fileName]);\n }\n addedModifiedFiles.push(fileName);\n /* v8 ignore next 11 -- TODO: add test */\n } catch (err) {\n if (\n !err.message.includes(\n 'The following paths are ignored by one of your .gitignore files',\n )\n ) {\n throw err;\n }\n logger.debug(`Cannot commit ignored file: ${fileName}`);\n ignoredFiles.push(file.path);\n }\n }\n }\n\n const commitOptions: Options = {};\n if (getNoVerify().includes('commit')) {\n commitOptions['--no-verify'] = null;\n }\n\n const commitRes = await git.commit(message, [], commitOptions);\n if (\n isNonEmptyObject(commitRes.summary) &&\n commitRes.summary.changes === 0 &&\n commitRes.summary.insertions === 0 &&\n commitRes.summary.deletions === 0\n ) {\n logger.warn({ commitRes }, 'Detected empty commit - aborting git push');\n return null;\n }\n logger.debug(\n { deletedFiles, ignoredFiles, result: commitRes },\n `git commit`,\n );\n if (!force && !(await hasDiff('HEAD', `origin/${branchName}`))) {\n logger.debug(\n { branchName, deletedFiles, addedModifiedFiles, ignoredFiles },\n 'No file changes detected. Skipping commit',\n );\n return null;\n }\n\n const commitSha = (\n await git.revparse([branchName])\n ).trim() as LongCommitSha;\n const result: CommitResult = {\n parentCommitSha,\n commitSha,\n files: files.filter((fileChange) => {\n if (fileChange.type === 'deletion') {\n return deletedFiles.includes(fileChange.path);\n }\n return addedModifiedFiles.includes(fileChange.path);\n }),\n };\n\n return result;\n /* v8 ignore next 3 -- TODO: add test */\n } catch (err) {\n return handleCommitError(err, branchName, files);\n }\n}\n\nexport async function pushCommit({\n sourceRef,\n targetRef,\n files,\n pushOptions,\n}: PushFilesConfig): Promise<boolean> {\n await syncGit();\n logger.debug(`Pushing refSpec ${sourceRef}:${targetRef ?? sourceRef}`);\n let result = false;\n try {\n const gitOptions: TaskOptions = {\n '--force-with-lease': null,\n '-u': null,\n };\n if (getNoVerify().includes('push')) {\n gitOptions['--no-verify'] = null;\n }\n if (pushOptions) {\n gitOptions['--push-option'] = pushOptions;\n }\n\n const pushRes = await gitRetry(() =>\n git.push('origin', `${sourceRef}:${targetRef ?? sourceRef}`, gitOptions),\n );\n delete pushRes.repo;\n logger.debug({ result: pushRes }, 'git push');\n incLimitedValue('Commits');\n result = true;\n /* v8 ignore next 3 -- TODO: add test */\n } catch (err) {\n handleCommitError(err, sourceRef, files);\n }\n return result;\n}\n\nexport async function fetchBranch(\n branchName: string,\n): Promise<LongCommitSha | null> {\n await syncGit();\n logger.debug(`Fetching branch ${branchName}`);\n try {\n const ref = `refs/heads/${branchName}:refs/remotes/origin/${branchName}`;\n await gitRetry(() => git.pull(['origin', ref, '--force']));\n const commit = (await git.revparse([branchName])).trim() as LongCommitSha;\n config.branchCommits[branchName] = commit;\n config.branchIsModified[branchName] = false;\n return commit;\n /* v8 ignore next 3 -- TODO: add test */\n } catch (err) {\n return handleCommitError(err, branchName);\n }\n}\n\nexport async function commitFiles(\n commitConfig: CommitFilesConfig,\n): Promise<LongCommitSha | null> {\n try {\n const commitResult = await prepareCommit(commitConfig);\n if (commitResult) {\n const pushResult = await pushCommit({\n sourceRef: commitConfig.branchName,\n files: commitConfig.files,\n });\n if (pushResult) {\n const { branchName } = commitConfig;\n const { commitSha } = commitResult;\n config.branchCommits[branchName] = commitSha;\n config.branchIsModified[branchName] = false;\n return commitSha;\n }\n }\n return null;\n /* v8 ignore next 6 -- TODO: add test */\n } catch (err) {\n if (err.message.includes('[rejected] (stale info)')) {\n throw new Error(REPOSITORY_CHANGED);\n }\n throw err;\n }\n}\n\nexport function getUrl({\n protocol,\n auth,\n hostname,\n host,\n repository,\n}: {\n protocol?: GitProtocol;\n auth?: string;\n hostname?: string;\n host?: string;\n repository: string;\n}): string {\n if (protocol === 'ssh') {\n // TODO: types (#22198)\n return `git@${hostname!}:${repository}.git`;\n }\n return URL.format({\n protocol: protocol ?? 'https',\n auth,\n hostname,\n host,\n pathname: repository + '.git',\n });\n}\n\nlet remoteRefsExist = false;\n\n/**\n *\n * Non-branch refs allow us to store git objects without triggering CI pipelines.\n * It's useful for API-based branch rebasing.\n *\n * @see https://stackoverflow.com/questions/63866947/pushing-git-non-branch-references-to-a-remote/63868286\n *\n */\nexport async function pushCommitToRenovateRef(\n commitSha: string,\n refName: string,\n): Promise<void> {\n const fullRefName = `refs/renovate/branches/${refName}`;\n await git.raw(['update-ref', fullRefName, commitSha]);\n await git.push(['--force', 'origin', fullRefName]);\n remoteRefsExist = true;\n}\n\n/**\n *\n * Removes all remote \"refs/renovate/branches/*\" refs in two steps:\n *\n * Step 1: list refs\n *\n * $ git ls-remote origin \"refs/renovate/branches/*\"\n *\n * > cca38e9ea6d10946bdb2d0ca5a52c205783897aa refs/renovate/branches/foo\n * > 29ac154936c880068994e17eb7f12da7fdca70e5 refs/renovate/branches/bar\n * > 3fafaddc339894b6d4f97595940fd91af71d0355 refs/renovate/branches/baz\n * > ...\n *\n * Step 2:\n *\n * $ git push --delete origin refs/renovate/branches/foo refs/renovate/branches/bar refs/renovate/branches/baz\n *\n * If Step 2 fails because the repo doesn't allow bulk changes, we'll remove them one by one instead:\n *\n * $ git push --delete origin refs/renovate/branches/foo\n * $ git push --delete origin refs/renovate/branches/bar\n * $ git push --delete origin refs/renovate/branches/baz\n */\nexport async function clearRenovateRefs(): Promise<void> {\n if (!gitInitialized || !remoteRefsExist) {\n return;\n }\n\n logger.debug(`Cleaning up Renovate refs: refs/renovate/branches/*`);\n const renovateRefs: string[] = [];\n\n try {\n const rawOutput = await git.listRemote([\n config.url,\n 'refs/renovate/branches/*',\n ]);\n const refs = rawOutput\n .split(newlineRegex)\n .map((line) => line.replace(regEx(/[0-9a-f]+\\s+/i), '').trim())\n .filter((line) => line.startsWith('refs/renovate/branches/'));\n renovateRefs.push(...refs);\n /* v8 ignore next 3 -- TODO: add test */\n } catch (err) {\n logger.warn({ err }, `Renovate refs cleanup error`);\n }\n\n if (renovateRefs.length) {\n try {\n const pushOpts = ['--delete', 'origin', ...renovateRefs];\n await git.push(pushOpts);\n } catch (err) {\n if (bulkChangesDisallowed(err)) {\n for (const ref of renovateRefs) {\n try {\n const pushOpts = ['--delete', 'origin', ref];\n await git.push(pushOpts);\n /* v8 ignore next 4 -- TODO: add test */\n } catch (err) {\n logger.debug({ err }, 'Error deleting \"refs/renovate/branches/*\"');\n break;\n }\n }\n /* v8 ignore next 3 -- TODO: add test */\n } else {\n logger.warn({ err }, 'Error deleting \"refs/renovate/branches/*\"');\n }\n }\n }\n\n remoteRefsExist = false;\n}\n\nconst treeItemRegex = regEx(\n /^(?<mode>\\d{6})\\s+(?<type>blob|tree|commit)\\s+(?<sha>[0-9a-f]{40})\\s+(?<path>.*)$/,\n);\n\nconst treeShaRegex = regEx(/tree\\s+(?<treeSha>[0-9a-f]{40})\\s*/);\n\n/**\n *\n * Obtain top-level items of commit tree.\n * We don't need subtree items, so here are 2 steps only.\n *\n * Step 1: commit SHA -> tree SHA\n *\n * $ git cat-file -p <commit-sha>\n *\n * > tree <tree-sha>\n * > parent 59b8b0e79319b7dc38f7a29d618628f3b44c2fd7\n * > ...\n *\n * Step 2: tree SHA -> tree items (top-level)\n *\n * $ git cat-file -p <tree-sha>\n *\n * > 040000 tree 389400684d1f004960addc752be13097fe85d776 src\n * > ...\n * > 100644 blob 7d2edde437ad4e7bceb70dbfe70e93350d99c98b package.json\n *\n */\nexport async function listCommitTree(\n commitSha: LongCommitSha,\n): Promise<TreeItem[]> {\n const commitOutput = await git.catFile(['-p', commitSha]);\n const { treeSha } =\n /* v8 ignore next -- will never happen ? */\n treeShaRegex.exec(commitOutput)?.groups ?? {};\n const contents = await git.catFile(['-p', treeSha]);\n const lines = contents.split(newlineRegex);\n const result: TreeItem[] = [];\n for (const line of lines) {\n const matchGroups = treeItemRegex.exec(line)?.groups;\n if (matchGroups) {\n const { path, mode, type, sha } = matchGroups;\n result.push({ path, mode, type, sha: sha as LongCommitSha });\n }\n }\n return result;\n}\n\nasync function localBranchExists(branchName: string): Promise<boolean> {\n await syncGit();\n const localBranches = await git.branchLocal();\n return localBranches.all.includes(branchName);\n}\n\n/**\n * Synchronize a forked branch with its upstream counterpart.\n *\n * syncForkWithUpstream updates the fork's branch, to match the corresponding branch in the upstream repository.\n * The steps are:\n * 1. Check if the branch exists locally.\n * 2. If the branch exists locally: checkout the local branch.\n * 3. If the branch does _not_ exist locally: checkout the upstream branch.\n * 4. Reset the local branch to match the upstream branch.\n * 5. Force push the (updated) local branch to the origin repository.\n *\n * @param {string} branchName - The name of the branch to synchronize.\n * @returns A promise that resolves to True if the synchronization is successful, or `false` if an error occurs.\n */\nexport async function syncForkWithUpstream(branchName: string): Promise<void> {\n if (!config.upstreamUrl) {\n return;\n }\n logger.debug(\n `Synchronizing fork with \"${RENOVATE_FORK_UPSTREAM}\" remote for branch ${branchName}`,\n );\n const remotes = await getRemotes();\n /* v8 ignore next 3 -- this should not be possible if upstreamUrl exists */\n if (!remotes.some((r) => r === RENOVATE_FORK_UPSTREAM)) {\n throw new Error('No upstream remote exists, cannot sync fork');\n }\n try {\n await git.fetch([RENOVATE_FORK_UPSTREAM]);\n if (await localBranchExists(branchName)) {\n await checkoutBranch(branchName);\n } else {\n await checkoutBranchFromRemote(branchName, RENOVATE_FORK_UPSTREAM);\n }\n await resetHardFromRemote(`${RENOVATE_FORK_UPSTREAM}/${branchName}`);\n await forcePushToRemote(branchName, 'origin');\n } catch (err) /* v8 ignore next 3 -- shouldn't happen */ {\n logger.error({ err }, 'Error synchronizing fork');\n throw new Error(UNKNOWN_ERROR);\n }\n}\n\nexport async function getRemotes(): Promise<string[]> {\n logger.debug('git.getRemotes()');\n try {\n await syncGit();\n const remotes = await git.getRemotes();\n logger.debug(`Found remotes: ${remotes.map((r) => r.name).join(', ')}`);\n return remotes.map((remote) => remote.name);\n } catch (err) /* v8 ignore start */ {\n logger.error({ err }, 'Error getting remotes');\n throw err;\n } /* v8 ignore stop */\n}\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/util/git/index.ts"],"names":[],"mappings":";;;AAyEA,4BAyCC;AA4DD,gDA0BC;AAwCD,oCAEC;AAED,4BAcC;AAWD,sCAGC;AAiBD,oCAaC;AAED,wCA4BC;AAED,8CAMC;AAED,sCAmBC;AAED,0CA4BC;AAED,4BAEC;AAED,0BAqIC;AAED,sCAeC;AAED,oCAEC;AAGD,0CAEC;AAED,8CAeC;AAED,wCAsCC;AAED,4DA6BC;AAED,kDAUC;AAED,8CAWC;AAED,kCA2BC;AAED,sCAEC;AAED,gDAuCC;AAED,4CA8FC;AAED,gDAsEC;AAED,oCAgCC;AAED,oCA6BC;AAED,kCAkCC;AAED,0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String } from '@sindresorhus/is';\nimport fs from 'fs-extra';\nimport semver from 'semver';\nimport type { Options, SimpleGit, TaskOptions } from 'simple-git';\nimport { ResetMode, simpleGit } from 'simple-git';\nimport upath from 'upath';\nimport { getConfigFileNames } from '../../config/app-strings';\nimport { GlobalConfig } from '../../config/global';\nimport type { RenovateConfig } from '../../config/types';\nimport {\n CONFIG_VALIDATION,\n INVALID_PATH,\n REPOSITORY_CHANGED,\n REPOSITORY_DISABLED,\n REPOSITORY_EMPTY,\n SYSTEM_INSUFFICIENT_DISK_SPACE,\n TEMPORARY_ERROR,\n UNKNOWN_ERROR,\n} from '../../constants/error-messages';\nimport { logger } from '../../logger';\nimport { ExternalHostError } from '../../types/errors/external-host-error';\nimport type { GitProtocol } from '../../types/git';\nimport { incLimitedValue } from '../../workers/global/limits';\nimport { getCache } from '../cache/repository';\nimport { getEnv } from '../env';\nimport { getChildEnv } from '../exec/utils';\nimport { newlineRegex, regEx } from '../regex';\nimport { matchRegexOrGlobList } from '../string-match';\nimport { getGitEnvironmentVariables } from './auth';\nimport { parseGitAuthor } from './author';\nimport {\n getCachedBehindBaseResult,\n setCachedBehindBaseResult,\n} from './behind-base-branch-cache';\nimport { getNoVerify, simpleGitConfig } from './config';\nimport {\n getCachedConflictResult,\n setCachedConflictResult,\n} from './conflicts-cache';\nimport {\n bulkChangesDisallowed,\n checkForPlatformFailure,\n handleCommitError,\n} from './error';\nimport {\n getCachedModifiedResult,\n setCachedModifiedResult,\n} from './modified-cache';\nimport { configSigningKey, writePrivateKey } from './private-key';\nimport type {\n CommitFilesConfig,\n CommitResult,\n LocalConfig,\n LongCommitSha,\n PushFilesConfig,\n StatusResult,\n StorageConfig,\n TreeItem,\n} from './types';\n\nexport { setNoVerify } from './config';\nexport { setPrivateKey } from './private-key';\n\n// Retry parameters\nconst retryCount = 5;\nconst delaySeconds = 3;\nconst delayFactor = 2;\n\nexport const RENOVATE_FORK_UPSTREAM = 'renovate-fork-upstream';\n\n// A generic wrapper for simpleGit.* calls to make them more fault-tolerant\nexport async function gitRetry<T>(gitFunc: () => Promise<T>): Promise<T> {\n let round = 0;\n let lastError: Error | undefined;\n\n while (round <= retryCount) {\n if (round > 0) {\n logger.debug(`gitRetry round ${round}`);\n }\n try {\n const res = await gitFunc();\n if (round > 1) {\n logger.debug('Successful retry of git function');\n }\n return res;\n } catch (err) {\n lastError = err;\n logger.debug({ err }, `Git function thrown`);\n // Try to transform the Error to ExternalHostError\n const errChecked = checkForPlatformFailure(err);\n if (errChecked instanceof ExternalHostError) {\n logger.debug(\n { err: errChecked },\n `ExternalHostError thrown in round ${\n round + 1\n } of ${retryCount} - retrying in the next round`,\n );\n } else {\n throw err;\n }\n }\n\n const nextDelay = delayFactor ^ ((round - 1) * delaySeconds);\n logger.trace({ nextDelay }, `Delay next round`);\n await setTimeout(1000 * nextDelay);\n\n round++;\n }\n\n // Can't be `undefined` here.\n // eslint-disable-next-line @typescript-eslint/only-throw-error\n throw lastError;\n}\n\nasync function isDirectory(dir: string): Promise<boolean> {\n try {\n return (await fs.stat(dir)).isDirectory();\n } catch {\n return false;\n }\n}\n\nasync function getDefaultBranch(git: SimpleGit): Promise<string> {\n logger.debug('getDefaultBranch()');\n // see https://stackoverflow.com/a/62352647/3005034\n try {\n let res = await git.raw(['rev-parse', '--abbrev-ref', 'origin/HEAD']);\n /* v8 ignore next -- TODO: add test */\n if (!res) {\n logger.debug('Could not determine default branch using git rev-parse');\n const headPrefix = 'HEAD branch: ';\n res = (await git.raw(['remote', 'show', 'origin']))\n .split('\\n')\n .map((line) => line.trim())\n .find((line) => line.startsWith(headPrefix))!\n .replace(headPrefix, '');\n }\n\n return res.replace('origin/', '').trim();\n /* v8 ignore next -- TODO: add test */\n } catch (err) {\n logger.debug({ err }, 'Error getting default branch');\n const errChecked = checkForPlatformFailure(err);\n if (errChecked) {\n throw errChecked;\n }\n if (\n err.message.startsWith(\n 'fatal: ref refs/remotes/origin/HEAD is not a symbolic ref',\n )\n ) {\n throw new Error(REPOSITORY_EMPTY);\n }\n if (err.message.includes(\"fatal: ambiguous argument 'origin/HEAD'\")) {\n logger.warn('Error getting default branch');\n throw new Error(TEMPORARY_ERROR);\n }\n throw err;\n }\n}\n\nlet config: LocalConfig = {} as any;\n\n// TODO: can be undefined\nlet git: SimpleGit;\nlet gitInitialized: boolean;\nlet submodulesInitizialized: boolean;\n\nlet privateKeySet = false;\n\nexport const GIT_MINIMUM_VERSION = '2.33.0'; // git show-current\n\nexport async function validateGitVersion(): Promise<boolean> {\n let version: string | undefined;\n const globalGit = simpleGit();\n try {\n const { major, minor, patch, installed } = await globalGit.version();\n /* v8 ignore next 4 -- TODO: add test */\n if (!installed) {\n logger.error('Git not installed');\n return false;\n }\n version = `${major}.${minor}.${patch}`;\n /* v8 ignore next 4 */\n } catch (err) {\n logger.error({ err }, 'Error fetching git version');\n return false;\n }\n /* v8 ignore next 7 -- TODO: add test */\n if (!(version && semver.gte(version, GIT_MINIMUM_VERSION))) {\n logger.error(\n { detectedVersion: version, minimumVersion: GIT_MINIMUM_VERSION },\n 'Git version needs upgrading',\n );\n return false;\n }\n logger.debug(`Found valid git version: ${version}`);\n return true;\n}\n\nasync function fetchBranchCommits(preferUpstream = true): Promise<void> {\n config.branchCommits = {};\n const url =\n preferUpstream && config.upstreamUrl ? config.upstreamUrl : config.url;\n logger.debug(`fetchBranchCommits(): url=${url}`);\n const opts = ['ls-remote', '--heads', url];\n if (config.extraCloneOpts) {\n Object.entries(config.extraCloneOpts).forEach((e) =>\n // TODO: types (#22198)\n opts.unshift(e[0], `${e[1]!}`),\n );\n }\n try {\n const lsRemoteRes = await gitRetry(() => git.raw(opts));\n logger.trace({ lsRemoteRes }, 'git ls-remote result');\n lsRemoteRes\n .split(newlineRegex)\n .filter(Boolean)\n .map((line) => line.trim().split(regEx(/\\s+/)))\n .forEach(([sha, ref]) => {\n config.branchCommits[ref.replace('refs/heads/', '')] =\n sha as LongCommitSha;\n });\n logger.trace({ branchCommits: config.branchCommits }, 'branch commits');\n /* v8 ignore next 11 -- TODO: add test */\n } catch (err) {\n const errChecked = checkForPlatformFailure(err);\n if (errChecked) {\n throw errChecked;\n }\n logger.debug({ err }, 'git error');\n if (err.message?.includes('Please ask the owner to check their account')) {\n throw new Error(REPOSITORY_DISABLED);\n }\n throw err;\n }\n}\n\nexport async function fetchRevSpec(revSpec: string): Promise<void> {\n await gitRetry(() => git.fetch(['origin', revSpec]));\n}\n\nexport async function initRepo(args: StorageConfig): Promise<void> {\n config = { ...args } as any;\n config.ignoredAuthors = [];\n config.additionalBranches = [];\n config.branchIsModified = {};\n // TODO: safe to pass all env variables? use `getChildEnv` instead?\n git = simpleGit(GlobalConfig.get('localDir'), simpleGitConfig()).env({\n ...getEnv(),\n LANG: 'C.UTF-8',\n LC_ALL: 'C.UTF-8',\n });\n gitInitialized = false;\n submodulesInitizialized = false;\n await fetchBranchCommits();\n}\n\nasync function resetToBranch(branchName: string): Promise<void> {\n logger.debug(`resetToBranch(${branchName})`);\n await git.raw(['reset', '--hard']);\n await gitRetry(() => git.checkout(branchName));\n await git.raw(['reset', '--hard', 'origin/' + branchName]);\n await git.raw(['clean', '-fd']);\n}\n\n/* v8 ignore next 4 -- TODO: add test */\nexport async function resetToCommit(commit: LongCommitSha): Promise<void> {\n logger.debug(`resetToCommit(${commit})`);\n await git.raw(['reset', '--hard', commit]);\n}\n\nasync function deleteLocalBranch(branchName: string): Promise<void> {\n await git.branch(['-D', branchName]);\n}\n\nasync function cleanLocalBranches(): Promise<void> {\n const existingBranches = (await git.raw(['branch']))\n .split(newlineRegex)\n .map((branch) => branch.trim())\n .filter((branch) => branch.length > 0 && !branch.startsWith('* '));\n logger.debug({ existingBranches });\n for (const branchName of existingBranches) {\n await deleteLocalBranch(branchName);\n }\n}\n\nexport function setGitAuthor(gitAuthor: string | undefined): void {\n const gitAuthorParsed = parseGitAuthor(\n gitAuthor ?? 'Renovate Bot <renovate@whitesourcesoftware.com>',\n );\n if (!gitAuthorParsed) {\n const error = new Error(CONFIG_VALIDATION);\n error.validationSource = 'None';\n error.validationError = 'Invalid gitAuthor';\n error.validationMessage = `\\`gitAuthor\\` is not parsed as valid RFC5322 format: \\`${gitAuthor!}\\``;\n throw error;\n }\n config.gitAuthorName = gitAuthorParsed.name;\n config.gitAuthorEmail = gitAuthorParsed.address;\n}\n\nexport async function writeGitAuthor(): Promise<void> {\n const { gitAuthorName, gitAuthorEmail, writeGitDone } = config;\n /* v8 ignore next 3 -- TODO: add test */\n if (writeGitDone) {\n return;\n }\n config.writeGitDone = true;\n try {\n if (gitAuthorName) {\n logger.debug(`Setting git author name: ${gitAuthorName}`);\n await git.addConfig('user.name', gitAuthorName);\n }\n if (gitAuthorEmail) {\n logger.debug(`Setting git author email: ${gitAuthorEmail}`);\n await git.addConfig('user.email', gitAuthorEmail);\n }\n /* v8 ignore next 11 -- TODO: add test */\n } catch (err) {\n const errChecked = checkForPlatformFailure(err);\n if (errChecked) {\n throw errChecked;\n }\n logger.debug(\n { err, gitAuthorName, gitAuthorEmail },\n 'Error setting git author config',\n );\n throw new Error(TEMPORARY_ERROR);\n }\n}\n\nexport function setUserRepoConfig({\n gitIgnoredAuthors,\n gitAuthor,\n}: RenovateConfig): void {\n config.ignoredAuthors = gitIgnoredAuthors ?? [];\n setGitAuthor(gitAuthor);\n}\n\nexport async function getSubmodules(): Promise<string[]> {\n try {\n return (\n (await git.raw([\n 'config',\n '--file',\n '.gitmodules',\n '--get-regexp',\n '\\\\.path',\n ])) || ''\n )\n .trim()\n .split(regEx(/[\\n\\s]/))\n .filter((_e: string, i: number) => i % 2);\n /* v8 ignore next 4 -- TODO: add test */\n } catch (err) {\n logger.warn({ err }, 'Error getting submodules');\n return [];\n }\n}\n\nexport async function cloneSubmodules(\n shouldClone: boolean,\n cloneSubmodulesFilter: string[] | undefined,\n): Promise<void> {\n if (!shouldClone || submodulesInitizialized) {\n return;\n }\n submodulesInitizialized = true;\n const gitEnv = getChildEnv({ env: getGitEnvironmentVariables() });\n await syncGit();\n const submodules = await getSubmodules();\n for (const submodule of submodules) {\n if (!matchRegexOrGlobList(submodule, cloneSubmodulesFilter ?? ['*'])) {\n logger.debug(\n { cloneSubmodulesFilter },\n `Skipping submodule ${submodule}`,\n );\n continue;\n }\n try {\n logger.debug(`Cloning git submodule at ${submodule}`);\n await gitRetry(() =>\n git.env(gitEnv).submoduleUpdate(['--init', '--recursive', submodule]),\n );\n } catch (err) {\n logger.warn({ err, submodule }, `Unable to initialise git submodule`);\n }\n }\n}\n\nexport function isCloned(): boolean {\n return gitInitialized;\n}\n\nexport async function syncGit(): Promise<void> {\n if (gitInitialized) {\n /* v8 ignore next 3 -- TODO: add test */\n if (getEnv().RENOVATE_X_CLEAR_HOOKS) {\n await git.raw(['config', 'core.hooksPath', '/dev/null']);\n }\n return;\n }\n /* v8 ignore next 3 -- failsafe TODO: add test */\n if (GlobalConfig.get('platform') === 'local') {\n throw new Error('Cannot sync git when platform=local');\n }\n gitInitialized = true;\n const localDir = GlobalConfig.get('localDir')!;\n logger.debug(`syncGit(): Initializing git repository into ${localDir}`);\n const gitHead = upath.join(localDir, '.git/HEAD');\n let clone = true;\n\n if (await fs.pathExists(gitHead)) {\n logger.debug(\n `syncGit(): Found existing git repository, attempting git fetch`,\n );\n try {\n await git.raw(['remote', 'set-url', 'origin', config.url]);\n const fetchStart = Date.now();\n await gitRetry(() => git.fetch(['--prune', 'origin']));\n config.currentBranch =\n config.currentBranch || (await getDefaultBranch(git));\n await resetToBranch(config.currentBranch);\n await cleanLocalBranches();\n const durationMs = Math.round(Date.now() - fetchStart);\n logger.info({ durationMs }, 'git fetch completed');\n clone = false;\n /* v8 ignore next -- TODO: add test */\n } catch (err) {\n if (err.message === REPOSITORY_EMPTY) {\n throw err;\n }\n logger.info({ err }, 'git fetch error, falling back to git clone');\n }\n }\n if (clone) {\n const cloneStart = Date.now();\n try {\n const opts: string[] = [];\n if (config.defaultBranch) {\n opts.push('-b', config.defaultBranch);\n }\n if (config.fullClone) {\n logger.debug('Performing full clone');\n } else {\n logger.debug('Performing blobless clone');\n opts.push('--filter=blob:none');\n }\n if (config.extraCloneOpts) {\n Object.entries(config.extraCloneOpts).forEach((e) =>\n // TODO: types (#22198)\n opts.push(e[0], `${e[1]!}`),\n );\n }\n const emptyDirAndClone = async (): Promise<void> => {\n await fs.emptyDir(localDir);\n await git.clone(config.url, '.', opts);\n };\n await gitRetry(() => emptyDirAndClone());\n /* v8 ignore next 10 -- TODO: add test */\n } catch (err) {\n logger.debug({ err }, 'git clone error');\n if (err.message?.includes('No space left on device')) {\n throw new Error(SYSTEM_INSUFFICIENT_DISK_SPACE);\n }\n if (err.message === REPOSITORY_EMPTY) {\n throw err;\n }\n throw new ExternalHostError(err, 'git');\n }\n const durationMs = Math.round(Date.now() - cloneStart);\n logger.debug({ durationMs }, 'git clone completed');\n }\n try {\n config.currentBranchSha = (\n await git.raw(['rev-parse', 'HEAD'])\n ).trim() as LongCommitSha;\n /* v8 ignore next -- TODO: add test */\n } catch (err) {\n if (err.message?.includes('fatal: not a git repository')) {\n throw new Error(REPOSITORY_CHANGED);\n }\n throw err;\n }\n // This will only happen now if set in global config\n await cloneSubmodules(!!config.cloneSubmodules, config.cloneSubmodulesFilter);\n try {\n const latestCommit = (await git.log({ n: 1 })).latest;\n logger.debug({ latestCommit }, 'latest repository commit');\n /* v8 ignore next -- TODO: add test */\n } catch (err) {\n const errChecked = checkForPlatformFailure(err);\n if (errChecked) {\n throw errChecked;\n }\n if (err.message.includes('does not have any commits yet')) {\n throw new Error(REPOSITORY_EMPTY);\n }\n logger.warn({ err }, 'Cannot retrieve latest commit');\n }\n config.currentBranch =\n config.currentBranch ??\n config.defaultBranch ??\n (await getDefaultBranch(git));\n /* v8 ignore next -- TODO: add test */\n delete getCache()?.semanticCommits;\n\n // If upstreamUrl is set then the bot is running in fork mode\n // The \"upstream\" remote is the original repository which was forked from\n if (config.upstreamUrl) {\n logger.debug(\n `Bringing default branch up-to-date with ${RENOVATE_FORK_UPSTREAM}, to get latest config`,\n );\n // Add remote if it does not exist\n const remotes = await git.getRemotes(true);\n if (!remotes.some((remote) => remote.name === RENOVATE_FORK_UPSTREAM)) {\n logger.debug(`Adding remote ${RENOVATE_FORK_UPSTREAM}`);\n await git.addRemote(RENOVATE_FORK_UPSTREAM, config.upstreamUrl);\n }\n await syncForkWithUpstream(config.currentBranch);\n await fetchBranchCommits(false);\n }\n\n config.currentBranchSha = (\n await git.revparse('HEAD')\n ).trim() as LongCommitSha;\n logger.debug(`Current branch SHA: ${config.currentBranchSha}`);\n}\n\nexport async function getRepoStatus(path?: string): Promise<StatusResult> {\n if (isString(path)) {\n const localDir = GlobalConfig.get('localDir');\n const localPath = upath.resolve(localDir, path);\n if (!localPath.startsWith(upath.resolve(localDir))) {\n logger.warn(\n { localPath, localDir },\n 'Preventing access to file outside the local directory',\n );\n throw new Error(INVALID_PATH);\n }\n }\n\n await syncGit();\n return git.status(path ? [path] : []);\n}\n\nexport function branchExists(branchName: string): boolean {\n return !!config.branchCommits[branchName];\n}\n\n// Return the commit SHA for a branch\nexport function getBranchCommit(branchName: string): LongCommitSha | null {\n return config.branchCommits?.[branchName] || null;\n}\n\nexport async function getCommitMessages(): Promise<string[]> {\n logger.debug('getCommitMessages');\n if (GlobalConfig.get('platform') !== 'local') {\n await syncGit();\n }\n try {\n const res = await git.log({\n n: 20,\n format: { message: '%s' },\n });\n return res.all.map((commit) => commit.message);\n /* v8 ignore next 3 -- TODO: add test */\n } catch {\n return [];\n }\n}\n\nexport async function checkoutBranch(\n branchName: string,\n): Promise<LongCommitSha> {\n logger.debug(`Setting current branch to ${branchName}`);\n await syncGit();\n try {\n await gitRetry(() =>\n git.checkout(\n submodulesInitizialized\n ? ['-f', '--recurse-submodules', branchName, '--']\n : ['-f', branchName, '--'],\n ),\n );\n config.currentBranch = branchName;\n config.currentBranchSha = (\n await git.raw(['rev-parse', 'HEAD'])\n ).trim() as LongCommitSha;\n const latestCommitDate = (await git.log({ n: 1 }))?.latest?.date;\n if (latestCommitDate) {\n logger.debug(\n { branchName, latestCommitDate, sha: config.currentBranchSha },\n 'latest commit',\n );\n }\n await git.reset(ResetMode.HARD);\n return config.currentBranchSha;\n /* v8 ignore next 11 -- TODO: add test */\n } catch (err) {\n const errChecked = checkForPlatformFailure(err);\n if (errChecked) {\n throw errChecked;\n }\n if (err.message?.includes('fatal: ambiguous argument')) {\n logger.warn({ err }, 'Failed to checkout branch');\n throw new Error(TEMPORARY_ERROR);\n }\n throw err;\n }\n}\n\nexport async function checkoutBranchFromRemote(\n branchName: string,\n remoteName: string,\n): Promise<LongCommitSha> {\n logger.debug(`Checking out branch ${branchName} from remote ${remoteName}`);\n await syncGit();\n try {\n await gitRetry(() =>\n git.checkoutBranch(branchName, `${remoteName}/${branchName}`),\n );\n config.currentBranch = branchName;\n config.currentBranchSha = (\n await git.revparse('HEAD')\n ).trim() as LongCommitSha;\n logger.debug(`Checked out branch ${branchName} from remote ${remoteName}`);\n config.branchCommits[branchName] = config.currentBranchSha;\n return config.currentBranchSha;\n } catch (err) {\n const errChecked = checkForPlatformFailure(err);\n /* v8 ignore next 3 -- hard to test */\n if (errChecked) {\n throw errChecked;\n }\n if (err.message?.includes('fatal: ambiguous argument')) {\n logger.warn({ err }, 'Failed to checkout branch');\n throw new Error(TEMPORARY_ERROR);\n }\n throw err;\n }\n}\n\nexport async function resetHardFromRemote(\n remoteAndBranch: string,\n): Promise<void> {\n try {\n const resetLog = await git.reset(['--hard', remoteAndBranch]);\n logger.debug({ resetLog }, 'git reset log');\n } catch (err) {\n logger.error({ err }, 'Error during git reset --hard');\n throw err;\n }\n}\n\nexport async function forcePushToRemote(\n branchName: string,\n remote: string,\n): Promise<void> {\n try {\n const pushLog = await git.push([remote, branchName, '--force']);\n logger.debug({ pushLog }, 'git push log');\n } catch (err) {\n logger.error({ err }, 'Error during git push --force');\n throw err;\n }\n}\n\nexport async function getFileList(): Promise<string[]> {\n await syncGit();\n const branch = config.currentBranch;\n let files: string;\n try {\n files = await git.raw(['ls-tree', '-r', `refs/heads/${branch}`]);\n /* v8 ignore next 10 -- TODO: add test */\n } catch (err) {\n if (err.message?.includes('fatal: Not a valid object name')) {\n logger.debug(\n { err },\n 'Branch not found when checking branch list - aborting',\n );\n throw new Error(REPOSITORY_CHANGED);\n }\n throw err;\n }\n /* v8 ignore next 3 -- TODO: add test */\n if (!files) {\n return [];\n }\n // submodules are starting with `160000 commit`\n return files\n .split(newlineRegex)\n .filter(isString)\n .filter((line) => line.startsWith('100'))\n .map((line) => line.split(regEx(/\\t/)).pop()!);\n}\n\nexport function getBranchList(): string[] {\n return Object.keys(config.branchCommits ?? {});\n}\n\nexport async function isBranchBehindBase(\n branchName: string,\n baseBranch: string,\n): Promise<boolean> {\n const baseBranchSha = getBranchCommit(baseBranch);\n const branchSha = getBranchCommit(branchName);\n let isBehind = getCachedBehindBaseResult(\n branchName,\n branchSha,\n baseBranch,\n baseBranchSha,\n );\n if (isBehind !== null) {\n logger.debug(`branch.isBehindBase(): using cached result \"${isBehind}\"`);\n return isBehind;\n }\n\n logger.debug('branch.isBehindBase(): using git to calculate');\n\n await syncGit();\n try {\n const behindCount = (\n await git.raw(['rev-list', '--count', `${branchSha!}..${baseBranchSha!}`])\n ).trim();\n isBehind = behindCount !== '0';\n logger.debug(\n { baseBranch, branchName },\n `branch.isBehindBase(): ${isBehind}`,\n );\n setCachedBehindBaseResult(branchName, isBehind);\n return isBehind;\n /* v8 ignore next 7 -- TODO: add test */\n } catch (err) {\n const errChecked = checkForPlatformFailure(err);\n if (errChecked) {\n throw errChecked;\n }\n throw err;\n }\n}\n\nexport async function isBranchModified(\n branchName: string,\n baseBranch: string,\n): Promise<boolean> {\n if (!branchExists(branchName)) {\n logger.debug('branch.isModified(): no cache');\n return false;\n }\n // First check local config\n if (config.branchIsModified[branchName] !== undefined) {\n return config.branchIsModified[branchName];\n }\n // Second check repository cache\n const isModified = getCachedModifiedResult(\n branchName,\n getBranchCommit(branchName), // branch sha\n );\n if (isModified !== null) {\n logger.debug(`branch.isModified(): using cached result \"${isModified}\"`);\n config.branchIsModified[branchName] = isModified;\n return isModified;\n }\n\n logger.debug('branch.isModified(): using git to calculate');\n\n await syncGit();\n const committedAuthors = new Set<string>();\n try {\n const commits = await git.log([\n `origin/${baseBranch}..origin/${branchName}`,\n ]);\n\n for (const commit of commits.all) {\n committedAuthors.add(commit.author_email);\n }\n /* v8 ignore next 10 -- TODO: add test */\n } catch (err) {\n if (err.message?.includes('fatal: bad revision')) {\n logger.debug(\n { err },\n 'Remote branch not found when checking last commit author - aborting run',\n );\n throw new Error(REPOSITORY_CHANGED);\n }\n logger.warn({ err }, 'Error checking last author for isBranchModified');\n }\n const { gitAuthorEmail, ignoredAuthors } = config;\n\n const includedAuthors = new Set(committedAuthors);\n\n if (gitAuthorEmail) {\n includedAuthors.delete(gitAuthorEmail);\n }\n\n for (const ignoredAuthor of ignoredAuthors) {\n includedAuthors.delete(ignoredAuthor);\n }\n\n if (includedAuthors.size === 0) {\n // authors all match - branch has not been modified\n logger.trace(\n {\n branchName,\n baseBranch,\n committedAuthors: [...committedAuthors],\n includedAuthors: [...includedAuthors],\n gitAuthorEmail,\n ignoredAuthors,\n },\n 'branch.isModified() = false',\n );\n logger.debug('branch.isModified() = false');\n config.branchIsModified[branchName] = false;\n setCachedModifiedResult(branchName, false);\n return false;\n }\n logger.trace(\n {\n branchName,\n baseBranch,\n committedAuthors: [...committedAuthors],\n includedAuthors: [...includedAuthors],\n gitAuthorEmail,\n ignoredAuthors,\n },\n 'branch.isModified() = true',\n );\n logger.debug(\n { branchName, unrecognizedAuthors: [...includedAuthors] },\n 'branch.isModified() = true',\n );\n config.branchIsModified[branchName] = true;\n setCachedModifiedResult(branchName, true);\n return true;\n}\n\nexport async function isBranchConflicted(\n baseBranch: string,\n branch: string,\n): Promise<boolean> {\n logger.debug(`isBranchConflicted(${baseBranch}, ${branch})`);\n\n const baseBranchSha = getBranchCommit(baseBranch);\n const branchSha = getBranchCommit(branch);\n if (!baseBranchSha || !branchSha) {\n logger.warn(\n { baseBranch, branch },\n 'isBranchConflicted: branch does not exist',\n );\n return true;\n }\n\n const isConflicted = getCachedConflictResult(\n branch,\n branchSha,\n baseBranch,\n baseBranchSha,\n );\n if (isBoolean(isConflicted)) {\n logger.debug(\n `branch.isConflicted(): using cached result \"${isConflicted}\"`,\n );\n return isConflicted;\n }\n\n logger.debug('branch.isConflicted(): using git to calculate');\n\n let result = false;\n await syncGit();\n await writeGitAuthor();\n\n const origBranch = config.currentBranch;\n try {\n await git.reset(ResetMode.HARD);\n //TODO: see #18600\n if (origBranch !== baseBranch) {\n await git.checkout(baseBranch);\n }\n await git.merge(['--no-commit', '--no-ff', `origin/${branch}`]);\n } catch (err) {\n result = true;\n /* v8 ignore next -- TODO: add test */\n if (!err?.git?.conflicts?.length) {\n logger.debug(\n { baseBranch, branch, err },\n 'isBranchConflicted: unknown error',\n );\n }\n } finally {\n try {\n await git.merge(['--abort']);\n if (origBranch !== baseBranch) {\n await git.checkout(origBranch);\n }\n /* v8 ignore next -- TODO: add test */\n } catch (err) {\n logger.debug(\n { baseBranch, branch, err },\n 'isBranchConflicted: cleanup error',\n );\n }\n }\n\n setCachedConflictResult(branch, result);\n logger.debug(`branch.isConflicted(): ${result}`);\n return result;\n}\n\nexport async function deleteBranch(branchName: string): Promise<void> {\n await syncGit();\n try {\n const deleteCommand = ['push', '--delete', 'origin', branchName];\n\n if (getNoVerify().includes('push')) {\n deleteCommand.push('--no-verify');\n }\n\n await gitRetry(() => git.raw(deleteCommand));\n logger.debug(`Deleted remote branch: ${branchName}`);\n } catch (err) {\n const errChecked = checkForPlatformFailure(err);\n /* v8 ignore next 3 -- TODO: add test */\n if (errChecked) {\n throw errChecked;\n }\n logger.debug(`No remote branch to delete with name: ${branchName}`);\n }\n try {\n /* v8 ignore next 2 -- TODO: add test (always throws) */\n await deleteLocalBranch(branchName);\n logger.debug(`Deleted local branch: ${branchName}`);\n } catch (err) {\n const errChecked = checkForPlatformFailure(err);\n /* v8 ignore next 3 -- TODO: add test */\n if (errChecked) {\n throw errChecked;\n }\n logger.debug(`No local branch to delete with name: ${branchName}`);\n }\n delete config.branchCommits[branchName];\n}\n\nexport async function mergeToLocal(refSpecToMerge: string): Promise<void> {\n let status: StatusResult | undefined;\n try {\n await syncGit();\n await writeGitAuthor();\n await git.reset(ResetMode.HARD);\n await gitRetry(() =>\n git.checkout([\n '-B',\n config.currentBranch,\n 'origin/' + config.currentBranch,\n ]),\n );\n status = await git.status();\n await fetchRevSpec(refSpecToMerge);\n await gitRetry(() => git.merge(['FETCH_HEAD']));\n } catch (err) {\n logger.debug(\n {\n baseBranch: config.currentBranch,\n baseSha: config.currentBranchSha,\n refSpecToMerge,\n status,\n err,\n },\n 'mergeLocally error',\n );\n throw err;\n }\n}\n\nexport async function mergeBranch(branchName: string): Promise<void> {\n let status: StatusResult | undefined;\n try {\n await syncGit();\n await writeGitAuthor();\n await git.reset(ResetMode.HARD);\n await gitRetry(() =>\n git.checkout(['-B', branchName, 'origin/' + branchName]),\n );\n await gitRetry(() =>\n git.checkout([\n '-B',\n config.currentBranch,\n 'origin/' + config.currentBranch,\n ]),\n );\n status = await git.status();\n await gitRetry(() => git.merge(['--ff-only', branchName]));\n await gitRetry(() => git.push('origin', config.currentBranch));\n incLimitedValue('Commits');\n } catch (err) {\n logger.debug(\n {\n baseBranch: config.currentBranch,\n baseSha: config.currentBranchSha,\n branchName,\n branchSha: getBranchCommit(branchName),\n status,\n err,\n },\n 'mergeBranch error',\n );\n throw err;\n }\n}\n\nexport async function getBranchLastCommitTime(\n branchName: string,\n): Promise<Date> {\n await syncGit();\n try {\n const time = await git.show(['-s', '--format=%ai', 'origin/' + branchName]);\n return new Date(Date.parse(time));\n } catch (err) {\n const errChecked = checkForPlatformFailure(err);\n /* v8 ignore next 3 -- TODO: add test */\n if (errChecked) {\n throw errChecked;\n }\n return new Date();\n }\n}\n\nexport function getBranchFiles(branchName: string): Promise<string[] | null> {\n return getBranchFilesFromRef(`origin/${branchName}`);\n}\n\nexport function getBranchFilesFromCommit(\n referenceCommit: LongCommitSha,\n): Promise<string[] | null> {\n return getBranchFilesFromRef(referenceCommit);\n}\n\nasync function getBranchFilesFromRef(\n refName: string,\n): Promise<string[] | null> {\n await syncGit();\n try {\n const diff = await gitRetry(() =>\n git.diffSummary([refName, `${refName}^`]),\n );\n return diff.files.map((file) => file.file);\n /* v8 ignore next 8 -- TODO: add test */\n } catch (err) {\n logger.warn({ err }, 'getBranchFilesFromRef error');\n const errChecked = checkForPlatformFailure(err);\n if (errChecked) {\n throw errChecked;\n }\n return null;\n }\n}\n\nexport async function getFile(\n filePath: string,\n branchName?: string,\n): Promise<string | null> {\n await syncGit();\n try {\n const content = await git.show([\n 'origin/' + (branchName ?? config.currentBranch) + ':' + filePath,\n ]);\n return content;\n } catch (err) {\n const errChecked = checkForPlatformFailure(err);\n /* v8 ignore next 3 -- TODO: add test */\n if (errChecked) {\n throw errChecked;\n }\n return null;\n }\n}\n\nexport async function getFiles(\n fileNames: string[],\n): Promise<Record<string, string | null>> {\n const fileContentMap: Record<string, string | null> = {};\n\n for (const fileName of fileNames) {\n fileContentMap[fileName] = await getFile(fileName);\n }\n\n return fileContentMap;\n}\n\nexport async function hasDiff(\n sourceRef: string,\n targetRef: string,\n): Promise<boolean> {\n await syncGit();\n try {\n return (\n (await gitRetry(() => git.diff([sourceRef, targetRef, '--']))) !== ''\n );\n } catch {\n return true;\n }\n}\n\nasync function handleCommitAuth(localDir: string): Promise<void> {\n if (!privateKeySet) {\n await writePrivateKey();\n privateKeySet = true;\n }\n await configSigningKey(localDir);\n await writeGitAuthor();\n}\n\n/**\n *\n * Prepare local branch with commit\n *\n * 0. Hard reset\n * 1. Creates local branch with `origin/` prefix\n * 2. Perform `git add` (respecting mode) and `git remove` for each file\n * 3. Perform commit\n * 4. Check whether resulting commit is empty or not (due to .gitignore)\n * 5. If not empty, return commit info for further processing\n *\n */\nexport async function prepareCommit({\n branchName,\n files,\n message,\n force = false,\n}: CommitFilesConfig): Promise<CommitResult | null> {\n const localDir = GlobalConfig.get('localDir')!;\n await syncGit();\n logger.debug(`Preparing files for committing to branch ${branchName}`);\n await handleCommitAuth(localDir);\n try {\n await git.reset(ResetMode.HARD);\n await git.raw(['clean', '-fd']);\n const parentCommitSha = config.currentBranchSha;\n await gitRetry(() =>\n git.checkout(['-B', branchName, 'origin/' + config.currentBranch]),\n );\n const deletedFiles: string[] = [];\n const addedModifiedFiles: string[] = [];\n const ignoredFiles: string[] = [];\n for (const file of files) {\n const fileName = file.path;\n if (file.type === 'deletion') {\n try {\n await git.rm([fileName]);\n deletedFiles.push(fileName);\n /* v8 ignore next 8 -- TODO: add test */\n } catch (err) {\n const errChecked = checkForPlatformFailure(err);\n if (errChecked) {\n throw errChecked;\n }\n logger.trace({ err, fileName }, 'Cannot delete file');\n ignoredFiles.push(fileName);\n }\n } else {\n if (await isDirectory(upath.join(localDir, fileName))) {\n // This is usually a git submodule update\n logger.trace({ fileName }, 'Adding directory commit');\n } else if (file.contents === null) {\n continue;\n } else {\n let contents: Buffer;\n if (typeof file.contents === 'string') {\n contents = Buffer.from(file.contents);\n /* v8 ignore next 3 -- TODO: add test */\n } else {\n contents = file.contents;\n }\n // some file systems including Windows don't support the mode\n // so the index should be manually updated after adding the file\n if (file.isSymlink) {\n await fs.symlink(file.contents, upath.join(localDir, fileName));\n } else {\n await fs.outputFile(upath.join(localDir, fileName), contents, {\n mode: file.isExecutable ? 0o777 : 0o666,\n });\n }\n }\n try {\n /* v8 ignore next 2 -- TODO: add test */\n const addParams =\n fileName === getConfigFileNames()[0] ? ['-f', fileName] : fileName;\n await git.add(addParams);\n if (file.isExecutable) {\n await git.raw(['update-index', '--chmod=+x', fileName]);\n }\n addedModifiedFiles.push(fileName);\n /* v8 ignore next 11 -- TODO: add test */\n } catch (err) {\n if (\n !err.message.includes(\n 'The following paths are ignored by one of your .gitignore files',\n )\n ) {\n throw err;\n }\n logger.debug(`Cannot commit ignored file: ${fileName}`);\n ignoredFiles.push(file.path);\n }\n }\n }\n\n const commitOptions: Options = {};\n if (getNoVerify().includes('commit')) {\n commitOptions['--no-verify'] = null;\n }\n\n const commitRes = await git.commit(message, [], commitOptions);\n if (\n isNonEmptyObject(commitRes.summary) &&\n commitRes.summary.changes === 0 &&\n commitRes.summary.insertions === 0 &&\n commitRes.summary.deletions === 0\n ) {\n logger.warn({ commitRes }, 'Detected empty commit - aborting git push');\n return null;\n }\n logger.debug(\n { deletedFiles, ignoredFiles, result: commitRes },\n `git commit`,\n );\n if (!force && !(await hasDiff('HEAD', `origin/${branchName}`))) {\n logger.debug(\n { branchName, deletedFiles, addedModifiedFiles, ignoredFiles },\n 'No file changes detected. Skipping commit',\n );\n return null;\n }\n\n const commitSha = (\n await git.revparse([branchName])\n ).trim() as LongCommitSha;\n const result: CommitResult = {\n parentCommitSha,\n commitSha,\n files: files.filter((fileChange) => {\n if (fileChange.type === 'deletion') {\n return deletedFiles.includes(fileChange.path);\n }\n return addedModifiedFiles.includes(fileChange.path);\n }),\n };\n\n return result;\n /* v8 ignore next 3 -- TODO: add test */\n } catch (err) {\n return handleCommitError(err, branchName, files);\n }\n}\n\nexport async function pushCommit({\n sourceRef,\n targetRef,\n files,\n pushOptions,\n}: PushFilesConfig): Promise<boolean> {\n await syncGit();\n logger.debug(`Pushing refSpec ${sourceRef}:${targetRef ?? sourceRef}`);\n let result = false;\n try {\n const gitOptions: TaskOptions = {\n '--force-with-lease': null,\n '-u': null,\n };\n if (getNoVerify().includes('push')) {\n gitOptions['--no-verify'] = null;\n }\n if (pushOptions) {\n gitOptions['--push-option'] = pushOptions;\n }\n\n const pushRes = await gitRetry(() =>\n git.push('origin', `${sourceRef}:${targetRef ?? sourceRef}`, gitOptions),\n );\n delete pushRes.repo;\n logger.debug({ result: pushRes }, 'git push');\n incLimitedValue('Commits');\n result = true;\n /* v8 ignore next 3 -- TODO: add test */\n } catch (err) {\n handleCommitError(err, sourceRef, files);\n }\n return result;\n}\n\nexport async function fetchBranch(\n branchName: string,\n): Promise<LongCommitSha | null> {\n await syncGit();\n logger.debug(`Fetching branch ${branchName}`);\n try {\n const ref = `refs/heads/${branchName}:refs/remotes/origin/${branchName}`;\n await gitRetry(() => git.pull(['origin', ref, '--force']));\n const commit = (await git.revparse([branchName])).trim() as LongCommitSha;\n config.branchCommits[branchName] = commit;\n config.branchIsModified[branchName] = false;\n return commit;\n /* v8 ignore next 3 -- TODO: add test */\n } catch (err) {\n return handleCommitError(err, branchName);\n }\n}\n\nexport async function commitFiles(\n commitConfig: CommitFilesConfig,\n): Promise<LongCommitSha | null> {\n try {\n const commitResult = await prepareCommit(commitConfig);\n if (commitResult) {\n const pushResult = await pushCommit({\n sourceRef: commitConfig.branchName,\n files: commitConfig.files,\n });\n if (pushResult) {\n const { branchName } = commitConfig;\n const { commitSha } = commitResult;\n config.branchCommits[branchName] = commitSha;\n config.branchIsModified[branchName] = false;\n return commitSha;\n }\n }\n return null;\n /* v8 ignore next -- TODO: add test */\n } catch (err) {\n if (err.message.includes('[rejected] (stale info)')) {\n throw new Error(REPOSITORY_CHANGED);\n }\n throw err;\n }\n}\n\nexport function getUrl({\n protocol,\n auth,\n hostname,\n host,\n repository,\n}: {\n protocol?: GitProtocol;\n auth?: string;\n hostname?: string;\n host?: string;\n repository: string;\n}): string {\n if (protocol === 'ssh') {\n // TODO: types (#22198)\n return `git@${hostname!}:${repository}.git`;\n }\n return URL.format({\n protocol: protocol ?? 'https',\n auth,\n hostname,\n host,\n pathname: repository + '.git',\n });\n}\n\nlet remoteRefsExist = false;\n\n/**\n *\n * Non-branch refs allow us to store git objects without triggering CI pipelines.\n * It's useful for API-based branch rebasing.\n *\n * @see https://stackoverflow.com/questions/63866947/pushing-git-non-branch-references-to-a-remote/63868286\n *\n */\nexport async function pushCommitToRenovateRef(\n commitSha: string,\n refName: string,\n): Promise<void> {\n const fullRefName = `refs/renovate/branches/${refName}`;\n await git.raw(['update-ref', fullRefName, commitSha]);\n await git.push(['--force', 'origin', fullRefName]);\n remoteRefsExist = true;\n}\n\n/**\n *\n * Removes all remote \"refs/renovate/branches/*\" refs in two steps:\n *\n * Step 1: list refs\n *\n * $ git ls-remote origin \"refs/renovate/branches/*\"\n *\n * > cca38e9ea6d10946bdb2d0ca5a52c205783897aa refs/renovate/branches/foo\n * > 29ac154936c880068994e17eb7f12da7fdca70e5 refs/renovate/branches/bar\n * > 3fafaddc339894b6d4f97595940fd91af71d0355 refs/renovate/branches/baz\n * > ...\n *\n * Step 2:\n *\n * $ git push --delete origin refs/renovate/branches/foo refs/renovate/branches/bar refs/renovate/branches/baz\n *\n * If Step 2 fails because the repo doesn't allow bulk changes, we'll remove them one by one instead:\n *\n * $ git push --delete origin refs/renovate/branches/foo\n * $ git push --delete origin refs/renovate/branches/bar\n * $ git push --delete origin refs/renovate/branches/baz\n */\nexport async function clearRenovateRefs(): Promise<void> {\n if (!gitInitialized || !remoteRefsExist) {\n return;\n }\n\n logger.debug(`Cleaning up Renovate refs: refs/renovate/branches/*`);\n const renovateRefs: string[] = [];\n\n try {\n const rawOutput = await git.listRemote([\n config.url,\n 'refs/renovate/branches/*',\n ]);\n const refs = rawOutput\n .split(newlineRegex)\n .map((line) => line.replace(regEx(/[0-9a-f]+\\s+/i), '').trim())\n .filter((line) => line.startsWith('refs/renovate/branches/'));\n renovateRefs.push(...refs);\n /* v8 ignore next 3 -- TODO: add test */\n } catch (err) {\n logger.warn({ err }, `Renovate refs cleanup error`);\n }\n\n if (renovateRefs.length) {\n try {\n const pushOpts = ['--delete', 'origin', ...renovateRefs];\n await git.push(pushOpts);\n } catch (err) {\n if (bulkChangesDisallowed(err)) {\n for (const ref of renovateRefs) {\n try {\n const pushOpts = ['--delete', 'origin', ref];\n await git.push(pushOpts);\n /* v8 ignore next 4 -- TODO: add test */\n } catch (err) {\n logger.debug({ err }, 'Error deleting \"refs/renovate/branches/*\"');\n break;\n }\n }\n /* v8 ignore next 3 -- TODO: add test */\n } else {\n logger.warn({ err }, 'Error deleting \"refs/renovate/branches/*\"');\n }\n }\n }\n\n remoteRefsExist = false;\n}\n\nconst treeItemRegex = regEx(\n /^(?<mode>\\d{6})\\s+(?<type>blob|tree|commit)\\s+(?<sha>[0-9a-f]{40})\\s+(?<path>.*)$/,\n);\n\nconst treeShaRegex = regEx(/tree\\s+(?<treeSha>[0-9a-f]{40})\\s*/);\n\n/**\n *\n * Obtain top-level items of commit tree.\n * We don't need subtree items, so here are 2 steps only.\n *\n * Step 1: commit SHA -> tree SHA\n *\n * $ git cat-file -p <commit-sha>\n *\n * > tree <tree-sha>\n * > parent 59b8b0e79319b7dc38f7a29d618628f3b44c2fd7\n * > ...\n *\n * Step 2: tree SHA -> tree items (top-level)\n *\n * $ git cat-file -p <tree-sha>\n *\n * > 040000 tree 389400684d1f004960addc752be13097fe85d776 src\n * > ...\n * > 100644 blob 7d2edde437ad4e7bceb70dbfe70e93350d99c98b package.json\n *\n */\nexport async function listCommitTree(\n commitSha: LongCommitSha,\n): Promise<TreeItem[]> {\n const commitOutput = await git.catFile(['-p', commitSha]);\n const { treeSha } =\n /* v8 ignore next -- will never happen ? */\n treeShaRegex.exec(commitOutput)?.groups ?? {};\n const contents = await git.catFile(['-p', treeSha]);\n const lines = contents.split(newlineRegex);\n const result: TreeItem[] = [];\n for (const line of lines) {\n const matchGroups = treeItemRegex.exec(line)?.groups;\n if (matchGroups) {\n const { path, mode, type, sha } = matchGroups;\n result.push({ path, mode, type, sha: sha as LongCommitSha });\n }\n }\n return result;\n}\n\nasync function localBranchExists(branchName: string): Promise<boolean> {\n await syncGit();\n const localBranches = await git.branchLocal();\n return localBranches.all.includes(branchName);\n}\n\n/**\n * Synchronize a forked branch with its upstream counterpart.\n *\n * syncForkWithUpstream updates the fork's branch, to match the corresponding branch in the upstream repository.\n * The steps are:\n * 1. Check if the branch exists locally.\n * 2. If the branch exists locally: checkout the local branch.\n * 3. If the branch does _not_ exist locally: checkout the upstream branch.\n * 4. Reset the local branch to match the upstream branch.\n * 5. Force push the (updated) local branch to the origin repository.\n *\n * @param {string} branchName - The name of the branch to synchronize.\n * @returns A promise that resolves to True if the synchronization is successful, or `false` if an error occurs.\n */\nexport async function syncForkWithUpstream(branchName: string): Promise<void> {\n if (!config.upstreamUrl) {\n return;\n }\n logger.debug(\n `Synchronizing fork with \"${RENOVATE_FORK_UPSTREAM}\" remote for branch ${branchName}`,\n );\n const remotes = await getRemotes();\n /* v8 ignore next 3 -- this should not be possible if upstreamUrl exists */\n if (!remotes.some((r) => r === RENOVATE_FORK_UPSTREAM)) {\n throw new Error('No upstream remote exists, cannot sync fork');\n }\n try {\n await git.fetch([RENOVATE_FORK_UPSTREAM]);\n if (await localBranchExists(branchName)) {\n await checkoutBranch(branchName);\n } else {\n await checkoutBranchFromRemote(branchName, RENOVATE_FORK_UPSTREAM);\n }\n await resetHardFromRemote(`${RENOVATE_FORK_UPSTREAM}/${branchName}`);\n await forcePushToRemote(branchName, 'origin');\n } catch (err) /* v8 ignore next 3 -- shouldn't happen */ {\n logger.error({ err }, 'Error synchronizing fork');\n throw new Error(UNKNOWN_ERROR);\n }\n}\n\nexport async function getRemotes(): Promise<string[]> {\n logger.debug('git.getRemotes()');\n try {\n await syncGit();\n const remotes = await git.getRemotes();\n logger.debug(`Found remotes: ${remotes.map((r) => r.name).join(', ')}`);\n return remotes.map((remote) => remote.name);\n } catch (err) /* v8 ignore next */ {\n logger.error({ err }, 'Error getting remotes');\n throw err;\n }\n}\n"]}
|
|
@@ -95,6 +95,7 @@ class SSHKey extends PrivateKey {
|
|
|
95
95
|
async importKey() {
|
|
96
96
|
const keyFileName = upath_1.default.join(node_os_1.default.tmpdir() + '/git-private-ssh.key');
|
|
97
97
|
await fs_extra_1.default.outputFile(keyFileName, this.key.replace(/\n?$/, '\n'));
|
|
98
|
+
/* v8 ignore next -- not easily testable */
|
|
98
99
|
process.on('exit', () => fs_extra_1.default.rmSync(keyFileName, { force: true }));
|
|
99
100
|
await fs_extra_1.default.chmod(keyFileName, 0o600);
|
|
100
101
|
// If there's a passphrase, decrypt the private key and save without passphrase
|
|
@@ -116,6 +117,7 @@ class SSHKey extends PrivateKey {
|
|
|
116
117
|
const { stdout } = await (0, exec_1.exec)(`ssh-keygen -y -f ${keyFileName}`);
|
|
117
118
|
const pubFileName = `${keyFileName}.pub`;
|
|
118
119
|
await fs_extra_1.default.outputFile(pubFileName, stdout);
|
|
120
|
+
/* v8 ignore next -- not easily testable */
|
|
119
121
|
process.on('exit', () => fs_extra_1.default.rmSync(pubFileName, { force: true }));
|
|
120
122
|
return keyFileName;
|
|
121
123
|
}
|