renovate 42.19.9 → 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/forgejo/forgejo-helper.d.ts +1 -0
- package/dist/modules/platform/forgejo/forgejo-helper.js +26 -0
- package/dist/modules/platform/forgejo/forgejo-helper.js.map +1 -1
- package/dist/modules/platform/forgejo/index.js +35 -20
- package/dist/modules/platform/forgejo/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/cache/repository/types.d.ts +1 -0
- package/dist/util/cache/repository/types.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":"execute-post-upgrade-commands.js","sourceRoot":"","sources":["../../../../../lib/workers/repository/update/branch/execute-post-upgrade-commands.ts"],"names":[],"mappings":";;AAiCA,kEAsQC;AAED,6CAwCC;;AAjVD,4DAA4B;AAC5B,cAAc;AACd,yCAA8E;AAC9E,0DAA0B;AAC1B,+CAAsD;AACtD,sDAAyD;AACzD,+CAAqD;AAErD,kDAAqD;AACrD,gDAA6C;AAE7C,4CAO6B;AAC7B,8CAAqD;AACrD,oDAAuE;AAEvE,0DAAuD;AACvD,kDAA+C;AAC/C,wDAAqD;AACrD,wDAAoD;AAQ7C,KAAK,UAAU,2BAA2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'crypto';\n// TODO #22198\nimport { isArray, isNonEmptyArray, isNonEmptyString } from '@sindresorhus/is';\nimport upath from 'upath';\nimport { mergeChildConfig } from '../../../../config';\nimport { GlobalConfig } from '../../../../config/global';\nimport { addMeta, logger } from '../../../../logger';\nimport type { ArtifactError } from '../../../../modules/manager/types';\nimport { coerceArray } from '../../../../util/array';\nimport { exec } from '../../../../util/exec';\nimport type { ExecOptions } from '../../../../util/exec/types';\nimport {\n ensureLocalDir,\n localPathIsFile,\n outputCacheFile,\n privateCacheDir,\n readLocalFile,\n writeLocalFile,\n} from '../../../../util/fs';\nimport { getRepoStatus } from '../../../../util/git';\nimport { getGitEnvironmentVariables } from '../../../../util/git/auth';\nimport type { FileChange } from '../../../../util/git/types';\nimport { minimatch } from '../../../../util/minimatch';\nimport { regEx } from '../../../../util/regex';\nimport { sanitize } from '../../../../util/sanitize';\nimport { compile } from '../../../../util/template';\nimport type { BranchConfig, BranchUpgradeConfig } from '../../../types';\n\nexport interface PostUpgradeCommandsExecutionResult {\n updatedArtifacts: FileChange[];\n artifactErrors: ArtifactError[];\n}\n\nexport async function postUpgradeCommandsExecutor(\n filteredUpgradeCommands: BranchUpgradeConfig[],\n config: BranchConfig,\n): Promise<PostUpgradeCommandsExecutionResult> {\n let updatedArtifacts = [...(config.updatedArtifacts ?? [])];\n const artifactErrors = [...(config.artifactErrors ?? [])];\n const allowedCommands = GlobalConfig.get('allowedCommands');\n\n for (const upgrade of filteredUpgradeCommands) {\n addMeta({ dep: upgrade.depName });\n logger.trace(\n {\n tasks: upgrade.postUpgradeTasks,\n allowedCommands,\n },\n `Checking for post-upgrade tasks`,\n );\n const commands = upgrade.postUpgradeTasks?.commands;\n const dataFileTemplate = upgrade.postUpgradeTasks?.dataFileTemplate;\n const fileFilters = upgrade.postUpgradeTasks?.fileFilters ?? ['**/*'];\n if (isNonEmptyArray(commands)) {\n // Persist updated files in file system so any executed commands can see them\n const previouslyModifiedFiles =\n config.updatedPackageFiles!.concat(updatedArtifacts);\n for (const file of previouslyModifiedFiles) {\n const canWriteFile = await localPathIsFile(file.path);\n if (file.type === 'addition' && !file.isSymlink && canWriteFile) {\n let contents: Buffer | null;\n if (typeof file.contents === 'string') {\n contents = Buffer.from(file.contents);\n } else {\n contents = file.contents;\n }\n // TODO #22198\n await writeLocalFile(file.path, contents!);\n }\n }\n\n let dataFilePath: string | null = null;\n if (dataFileTemplate) {\n const dataFileContent = sanitize(\n compile(dataFileTemplate, mergeChildConfig(config, upgrade)),\n );\n logger.debug(\n { dataFileTemplate },\n 'Processed post-upgrade commands data file template.',\n );\n\n const dataFileName = `post-upgrade-data-file-${crypto.randomBytes(8).toString('hex')}.tmp`;\n dataFilePath = upath.join(privateCacheDir(), dataFileName);\n\n try {\n await outputCacheFile(dataFilePath, dataFileContent);\n\n logger.debug(\n { dataFilePath, dataFileContent },\n 'Created post-upgrade commands data file.',\n );\n } catch (error) {\n artifactErrors.push({\n stderr: sanitize(\n `Failed to create post-upgrade commands data file at ${dataFilePath}, reason: ${error.message}`,\n ),\n });\n\n dataFilePath = null;\n }\n }\n\n const workingDirTemplate = upgrade.postUpgradeTasks?.workingDirTemplate;\n let workingDir: string | null = null;\n\n if (workingDirTemplate) {\n workingDir = sanitize(\n compile(workingDirTemplate, mergeChildConfig(config, upgrade)),\n );\n await ensureLocalDir(workingDir);\n logger.trace(\n { workingDirTemplate },\n 'Processed post-upgrade commands working directory template.',\n );\n }\n\n for (const cmd of commands) {\n const compiledCmd = compile(cmd, mergeChildConfig(config, upgrade));\n if (compiledCmd !== cmd) {\n logger.debug(\n { rawCmd: cmd, compiledCmd },\n 'Post-upgrade command has been compiled',\n );\n }\n if (\n allowedCommands!.some((pattern) => regEx(pattern).test(compiledCmd))\n ) {\n try {\n logger.trace({ cmd: compiledCmd }, 'Executing post-upgrade task');\n\n const execOpts: ExecOptions = {\n cwd: isNonEmptyString(workingDir)\n ? workingDir\n : GlobalConfig.get('localDir'),\n extraEnv: getGitEnvironmentVariables(),\n };\n if (dataFilePath) {\n execOpts.env = {\n RENOVATE_POST_UPGRADE_COMMAND_DATA_FILE: dataFilePath,\n };\n }\n const execResult = await exec(compiledCmd, execOpts);\n\n logger.debug(\n { cmd: compiledCmd, ...execResult },\n 'Executed post-upgrade task',\n );\n } catch (error) {\n artifactErrors.push({\n lockFile: upgrade.packageFile,\n stderr: sanitize(error.message),\n });\n }\n } else {\n logger.warn(\n {\n cmd: compiledCmd,\n allowedCommands,\n },\n 'Post-upgrade task did not match any on allowedCommands list',\n );\n artifactErrors.push({\n lockFile: upgrade.packageFile,\n stderr: sanitize(\n `Post-upgrade command '${compiledCmd}' has not been added to the allowed list in allowedCommands`,\n ),\n });\n }\n }\n\n const status = await getRepoStatus();\n\n logger.trace({ status }, 'git status after post-upgrade tasks');\n\n logger.debug(\n {\n addedCount: status.not_added?.length,\n modifiedCount: status.modified?.length,\n deletedCount: status.deleted?.length,\n renamedCount: status.renamed?.length,\n },\n 'git status counts after post-upgrade tasks',\n );\n\n const addedOrModifiedFiles = [\n ...coerceArray(status.not_added),\n ...coerceArray(status.modified),\n ...coerceArray(status.renamed?.map((x) => x.to)),\n ];\n const changedFiles = [\n ...addedOrModifiedFiles,\n ...coerceArray(status.deleted),\n ...coerceArray(status.renamed?.map((x) => x.from)),\n ];\n\n // Check for files which were previously deleted but have been re-added without modification\n const previouslyDeletedFiles = updatedArtifacts.filter(\n (ua) => ua.type === 'deletion',\n );\n for (const previouslyDeletedFile of previouslyDeletedFiles) {\n if (!changedFiles.includes(previouslyDeletedFile.path)) {\n logger.debug(\n { file: previouslyDeletedFile.path },\n 'Previously deleted file has been restored without modification',\n );\n updatedArtifacts = updatedArtifacts.filter(\n (ua) =>\n !(\n ua.type === 'deletion' && ua.path === previouslyDeletedFile.path\n ),\n );\n }\n }\n\n logger.trace({ addedOrModifiedFiles }, 'Added or modified files');\n logger.debug(\n `Checking ${addedOrModifiedFiles.length} added or modified files for post-upgrade changes`,\n );\n\n const fileExcludes: string[] = [];\n if (config.npmrc) {\n fileExcludes.push('.npmrc');\n }\n\n for (const relativePath of addedOrModifiedFiles) {\n if (\n fileExcludes.some((pattern) =>\n minimatch(pattern, { dot: true }).match(relativePath),\n )\n ) {\n continue;\n }\n\n let fileMatched = false;\n for (const pattern of fileFilters) {\n if (minimatch(pattern, { dot: true }).match(relativePath)) {\n fileMatched = true;\n logger.debug(\n { file: relativePath, pattern },\n 'Post-upgrade file saved',\n );\n const existingContent = await readLocalFile(relativePath);\n const existingUpdatedArtifacts = updatedArtifacts.find(\n (ua) => ua.path === relativePath,\n );\n if (existingUpdatedArtifacts?.type === 'addition') {\n existingUpdatedArtifacts.contents = existingContent;\n } else {\n updatedArtifacts.push({\n type: 'addition',\n path: relativePath,\n contents: existingContent,\n });\n }\n // If the file is deleted by a previous post-update command, remove the deletion from updatedArtifacts\n updatedArtifacts = updatedArtifacts.filter(\n (ua) => !(ua.type === 'deletion' && ua.path === relativePath),\n );\n }\n }\n if (!fileMatched) {\n logger.debug(\n { file: relativePath },\n 'Post-upgrade file did not match any file filters',\n );\n }\n }\n\n for (const relativePath of coerceArray(status.deleted)) {\n for (const pattern of fileFilters) {\n if (minimatch(pattern, { dot: true }).match(relativePath)) {\n if (\n !updatedArtifacts.some(\n (ua) => ua.path === relativePath && ua.type === 'deletion',\n )\n ) {\n logger.debug(\n { file: relativePath, pattern },\n 'Post-upgrade file removed',\n );\n updatedArtifacts.push({\n type: 'deletion',\n path: relativePath,\n });\n }\n // If the file is created or modified by a previous post-update command, remove the modification from updatedArtifacts\n updatedArtifacts = updatedArtifacts.filter(\n (ua) => !(ua.type === 'addition' && ua.path === relativePath),\n );\n }\n }\n }\n }\n }\n return { updatedArtifacts, artifactErrors };\n}\n\nexport default async function executePostUpgradeCommands(\n config: BranchConfig,\n): Promise<PostUpgradeCommandsExecutionResult | null> {\n const hasChangedFiles =\n (isArray(config.updatedPackageFiles) &&\n config.updatedPackageFiles.length > 0) ||\n (isArray(config.updatedArtifacts) && config.updatedArtifacts.length > 0);\n\n if (!hasChangedFiles) {\n /* Only run post-upgrade tasks if there are changes to package files... */\n logger.debug('No changes to package files, skipping post-upgrade tasks');\n return null;\n }\n\n const branchUpgradeCommands: BranchUpgradeConfig[] = [\n {\n manager: config.manager,\n depName: config.upgrades.map(({ depName }) => depName).join(' '),\n branchName: config.branchName,\n postUpgradeTasks:\n config.postUpgradeTasks!.executionMode === 'branch'\n ? config.postUpgradeTasks\n : undefined,\n fileFilters: config.fileFilters,\n },\n ];\n\n const updateUpgradeCommands: BranchUpgradeConfig[] = config.upgrades.filter(\n ({ postUpgradeTasks }) =>\n !postUpgradeTasks?.executionMode ||\n postUpgradeTasks.executionMode === 'update',\n );\n\n const { updatedArtifacts, artifactErrors } =\n await postUpgradeCommandsExecutor(updateUpgradeCommands, config);\n return postUpgradeCommandsExecutor(branchUpgradeCommands, {\n ...config,\n updatedArtifacts,\n artifactErrors,\n });\n}\n"]}
|
|
1
|
+
{"version":3,"file":"execute-post-upgrade-commands.js","sourceRoot":"","sources":["../../../../../lib/workers/repository/update/branch/execute-post-upgrade-commands.ts"],"names":[],"mappings":";;AAiCA,kEAuQC;AAED,6CAwCC;;AAlVD,4DAA4B;AAC5B,cAAc;AACd,yCAA8E;AAC9E,0DAA0B;AAC1B,+CAAsD;AACtD,sDAAyD;AACzD,+CAAqD;AAErD,kDAAqD;AACrD,gDAA6C;AAE7C,4CAO6B;AAC7B,8CAAqD;AACrD,oDAAuE;AAEvE,0DAAuD;AACvD,kDAA+C;AAC/C,wDAAqD;AACrD,wDAAoD;AAQ7C,KAAK,UAAU,2BAA2B,CAC/C,uBAA8C,EAC9C,MAAoB;IAEpB,IAAI,gBAAgB,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,gBAAgB,IAAI,EAAE,CAAC,CAAC,CAAC;IAC5D,MAAM,cAAc,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,cAAc,IAAI,EAAE,CAAC,CAAC,CAAC;IAC1D,MAAM,eAAe,GAAG,qBAAY,CAAC,G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C;IAE3E,IAAI,CAAC,eAAe,EAAE,CAAC;QACrB,0EAA0E;QAC1E,eAAM,CAAC,KAAK,CAAC,0DAA0D,CAAC,CAAC;QACzE,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,qBAAqB,GAA0B;QACnD;YACE,OAAO,EAAE,MAAM,CAAC,OAAO;YACvB,OAAO,EAAE,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;YAChE,UAAU,EAAE,MAAM,CAAC,UAAU;YAC7B,gBAAgB,EACd,MAAM,CAAC,gBAAiB,CAAC,aAAa,KAAK,QAAQ;gBACjD,CAAC,CAAC,MAAM,CAAC,gBAAgB;gBACzB,CAAC,CAAC,SAAS;YACf,WAAW,EAAE,MAAM,CAAC,WAAW;SAChC;KACF,CAAC;IAEF,MAAM,qBAAqB,GAA0B,MAAM,CAAC,QAAQ,CAAC,MAAM,CACzE,CAAC,EAAE,gBAAgB,EAAE,EAAE,EAAE,CACvB,CAAC,gBAAgB,EAAE,aAAa;QAChC,gBAAgB,CAAC,aAAa,KAAK,QAAQ,CAC9C,CAAC;IAEF,MAAM,EAAE,gBAAgB,EAAE,cAAc,EAAE,GACxC,MAAM,2BAA2B,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC;IACnE,OAAO,2BAA2B,CAAC,qBAAqB,EAAE;QACxD,GAAG,MAAM;QACT,gBAAgB;QAChB,cAAc;KACf,CAAC,CAAC;AACL,CAAC","sourcesContent":["import crypto from 'crypto';\n// TODO #22198\nimport { isArray, isNonEmptyArray, isNonEmptyString } from '@sindresorhus/is';\nimport upath from 'upath';\nimport { mergeChildConfig } from '../../../../config';\nimport { GlobalConfig } from '../../../../config/global';\nimport { addMeta, logger } from '../../../../logger';\nimport type { ArtifactError } from '../../../../modules/manager/types';\nimport { coerceArray } from '../../../../util/array';\nimport { exec } from '../../../../util/exec';\nimport type { ExecOptions } from '../../../../util/exec/types';\nimport {\n ensureLocalDir,\n localPathIsFile,\n outputCacheFile,\n privateCacheDir,\n readLocalFile,\n writeLocalFile,\n} from '../../../../util/fs';\nimport { getRepoStatus } from '../../../../util/git';\nimport { getGitEnvironmentVariables } from '../../../../util/git/auth';\nimport type { FileChange } from '../../../../util/git/types';\nimport { minimatch } from '../../../../util/minimatch';\nimport { regEx } from '../../../../util/regex';\nimport { sanitize } from '../../../../util/sanitize';\nimport { compile } from '../../../../util/template';\nimport type { BranchConfig, BranchUpgradeConfig } from '../../../types';\n\nexport interface PostUpgradeCommandsExecutionResult {\n updatedArtifacts: FileChange[];\n artifactErrors: ArtifactError[];\n}\n\nexport async function postUpgradeCommandsExecutor(\n filteredUpgradeCommands: BranchUpgradeConfig[],\n config: BranchConfig,\n): Promise<PostUpgradeCommandsExecutionResult> {\n let updatedArtifacts = [...(config.updatedArtifacts ?? [])];\n const artifactErrors = [...(config.artifactErrors ?? [])];\n const allowedCommands = GlobalConfig.get('allowedCommands');\n\n for (const upgrade of filteredUpgradeCommands) {\n addMeta({ dep: upgrade.depName });\n logger.trace(\n {\n tasks: upgrade.postUpgradeTasks,\n allowedCommands,\n },\n `Checking for post-upgrade tasks`,\n );\n const commands = upgrade.postUpgradeTasks?.commands;\n const dataFileTemplate = upgrade.postUpgradeTasks?.dataFileTemplate;\n const fileFilters = upgrade.postUpgradeTasks?.fileFilters ?? ['**/*'];\n if (isNonEmptyArray(commands)) {\n // Persist updated files in file system so any executed commands can see them\n const previouslyModifiedFiles =\n config.updatedPackageFiles!.concat(updatedArtifacts);\n for (const file of previouslyModifiedFiles) {\n const canWriteFile = await localPathIsFile(file.path);\n if (file.type === 'addition' && !file.isSymlink && canWriteFile) {\n let contents: Buffer | null;\n if (typeof file.contents === 'string') {\n contents = Buffer.from(file.contents);\n } else {\n contents = file.contents;\n }\n // TODO #22198\n await writeLocalFile(file.path, contents!);\n }\n }\n\n let dataFilePath: string | null = null;\n if (dataFileTemplate) {\n const dataFileContent = sanitize(\n compile(dataFileTemplate, mergeChildConfig(config, upgrade)),\n );\n logger.debug(\n { dataFileTemplate },\n 'Processed post-upgrade commands data file template.',\n );\n\n const dataFileName = `post-upgrade-data-file-${crypto.randomBytes(8).toString('hex')}.tmp`;\n dataFilePath = upath.join(privateCacheDir(), dataFileName);\n\n try {\n await outputCacheFile(dataFilePath, dataFileContent);\n\n logger.debug(\n { dataFilePath, dataFileContent },\n 'Created post-upgrade commands data file.',\n );\n } catch (error) {\n artifactErrors.push({\n stderr: sanitize(\n `Failed to create post-upgrade commands data file at ${dataFilePath}, reason: ${error.message}`,\n ),\n });\n\n dataFilePath = null;\n }\n }\n\n const workingDirTemplate = upgrade.postUpgradeTasks?.workingDirTemplate;\n let workingDir: string | null = null;\n\n if (workingDirTemplate) {\n workingDir = sanitize(\n compile(workingDirTemplate, mergeChildConfig(config, upgrade)),\n );\n await ensureLocalDir(workingDir);\n logger.trace(\n { workingDirTemplate },\n 'Processed post-upgrade commands working directory template.',\n );\n }\n\n for (const cmd of commands) {\n const compiledCmd = compile(cmd, mergeChildConfig(config, upgrade));\n if (compiledCmd !== cmd) {\n logger.debug(\n { rawCmd: cmd, compiledCmd },\n 'Post-upgrade command has been compiled',\n );\n }\n if (\n allowedCommands!.some((pattern) => regEx(pattern).test(compiledCmd))\n ) {\n try {\n logger.trace({ cmd: compiledCmd }, 'Executing post-upgrade task');\n\n const execOpts: ExecOptions = {\n cwd: isNonEmptyString(workingDir)\n ? workingDir\n : GlobalConfig.get('localDir'),\n extraEnv: getGitEnvironmentVariables(),\n };\n if (dataFilePath) {\n execOpts.env = {\n RENOVATE_POST_UPGRADE_COMMAND_DATA_FILE: dataFilePath,\n };\n }\n const execResult = await exec(compiledCmd, execOpts);\n\n logger.debug(\n { cmd: compiledCmd, ...execResult },\n 'Executed post-upgrade task',\n );\n } catch (error) {\n artifactErrors.push({\n lockFile: upgrade.packageFile,\n stderr: sanitize(error.message),\n });\n }\n } else {\n logger.warn(\n {\n cmd: compiledCmd,\n allowedCommands,\n },\n 'Post-upgrade task did not match any on allowedCommands list',\n );\n artifactErrors.push({\n lockFile: upgrade.packageFile,\n stderr: sanitize(\n `Post-upgrade command '${compiledCmd}' has not been added to the allowed list in allowedCommands`,\n ),\n });\n }\n }\n\n const status = await getRepoStatus();\n\n logger.trace({ status }, 'git status after post-upgrade tasks');\n\n logger.debug(\n {\n addedCount: status.not_added?.length,\n modifiedCount: status.modified?.length,\n deletedCount: status.deleted?.length,\n renamedCount: status.renamed?.length,\n },\n 'git status counts after post-upgrade tasks',\n );\n\n const addedOrModifiedFiles = [\n ...coerceArray(status.not_added),\n ...coerceArray(status.modified),\n ...coerceArray(status.renamed?.map((x) => x.to)),\n ];\n const changedFiles = [\n ...addedOrModifiedFiles,\n ...coerceArray(status.deleted),\n ...coerceArray(status.renamed?.map((x) => x.from)),\n ];\n\n // Check for files which were previously deleted but have been re-added without modification\n const previouslyDeletedFiles = updatedArtifacts.filter(\n (ua) => ua.type === 'deletion',\n );\n for (const previouslyDeletedFile of previouslyDeletedFiles) {\n /* v8 ignore if -- TODO: needs test */\n if (!changedFiles.includes(previouslyDeletedFile.path)) {\n logger.debug(\n { file: previouslyDeletedFile.path },\n 'Previously deleted file has been restored without modification',\n );\n updatedArtifacts = updatedArtifacts.filter(\n (ua) =>\n !(\n ua.type === 'deletion' && ua.path === previouslyDeletedFile.path\n ),\n );\n }\n }\n\n logger.trace({ addedOrModifiedFiles }, 'Added or modified files');\n logger.debug(\n `Checking ${addedOrModifiedFiles.length} added or modified files for post-upgrade changes`,\n );\n\n const fileExcludes: string[] = [];\n if (config.npmrc) {\n fileExcludes.push('.npmrc');\n }\n\n for (const relativePath of addedOrModifiedFiles) {\n if (\n fileExcludes.some((pattern) =>\n minimatch(pattern, { dot: true }).match(relativePath),\n )\n ) {\n continue;\n }\n\n let fileMatched = false;\n for (const pattern of fileFilters) {\n if (minimatch(pattern, { dot: true }).match(relativePath)) {\n fileMatched = true;\n logger.debug(\n { file: relativePath, pattern },\n 'Post-upgrade file saved',\n );\n const existingContent = await readLocalFile(relativePath);\n const existingUpdatedArtifacts = updatedArtifacts.find(\n (ua) => ua.path === relativePath,\n );\n if (existingUpdatedArtifacts?.type === 'addition') {\n existingUpdatedArtifacts.contents = existingContent;\n } else {\n updatedArtifacts.push({\n type: 'addition',\n path: relativePath,\n contents: existingContent,\n });\n }\n // If the file is deleted by a previous post-update command, remove the deletion from updatedArtifacts\n updatedArtifacts = updatedArtifacts.filter(\n (ua) => !(ua.type === 'deletion' && ua.path === relativePath),\n );\n }\n }\n if (!fileMatched) {\n logger.debug(\n { file: relativePath },\n 'Post-upgrade file did not match any file filters',\n );\n }\n }\n\n for (const relativePath of coerceArray(status.deleted)) {\n for (const pattern of fileFilters) {\n if (minimatch(pattern, { dot: true }).match(relativePath)) {\n if (\n !updatedArtifacts.some(\n (ua) => ua.path === relativePath && ua.type === 'deletion',\n )\n ) {\n logger.debug(\n { file: relativePath, pattern },\n 'Post-upgrade file removed',\n );\n updatedArtifacts.push({\n type: 'deletion',\n path: relativePath,\n });\n }\n // If the file is created or modified by a previous post-update command, remove the modification from updatedArtifacts\n updatedArtifacts = updatedArtifacts.filter(\n (ua) => !(ua.type === 'addition' && ua.path === relativePath),\n );\n }\n }\n }\n }\n }\n return { updatedArtifacts, artifactErrors };\n}\n\nexport default async function executePostUpgradeCommands(\n config: BranchConfig,\n): Promise<PostUpgradeCommandsExecutionResult | null> {\n const hasChangedFiles =\n (isArray(config.updatedPackageFiles) &&\n config.updatedPackageFiles.length > 0) ||\n (isArray(config.updatedArtifacts) && config.updatedArtifacts.length > 0);\n\n if (!hasChangedFiles) {\n /* Only run post-upgrade tasks if there are changes to package files... */\n logger.debug('No changes to package files, skipping post-upgrade tasks');\n return null;\n }\n\n const branchUpgradeCommands: BranchUpgradeConfig[] = [\n {\n manager: config.manager,\n depName: config.upgrades.map(({ depName }) => depName).join(' '),\n branchName: config.branchName,\n postUpgradeTasks:\n config.postUpgradeTasks!.executionMode === 'branch'\n ? config.postUpgradeTasks\n : undefined,\n fileFilters: config.fileFilters,\n },\n ];\n\n const updateUpgradeCommands: BranchUpgradeConfig[] = config.upgrades.filter(\n ({ postUpgradeTasks }) =>\n !postUpgradeTasks?.executionMode ||\n postUpgradeTasks.executionMode === 'update',\n );\n\n const { updatedArtifacts, artifactErrors } =\n await postUpgradeCommandsExecutor(updateUpgradeCommands, config);\n return postUpgradeCommandsExecutor(branchUpgradeCommands, {\n ...config,\n updatedArtifacts,\n artifactErrors,\n });\n}\n"]}
|
|
@@ -42,10 +42,9 @@ async function rebaseCheck(config, branchPr) {
|
|
|
42
42
|
const labelRebase = !!branchPr.labels?.includes(config.rebaseLabel);
|
|
43
43
|
if (labelRebase) {
|
|
44
44
|
logger_1.logger.debug(`Manual rebase requested via PR labels for #${branchPr.number}`);
|
|
45
|
-
/* v8 ignore
|
|
45
|
+
/* v8 ignore next -- needs test */
|
|
46
46
|
if (global_1.GlobalConfig.get('dryRun')) {
|
|
47
47
|
logger_1.logger.info(`DRY-RUN: Would delete label ${config.rebaseLabel} from #${branchPr.number}`);
|
|
48
|
-
/* v8 ignore stop -- needs test */
|
|
49
48
|
}
|
|
50
49
|
else {
|
|
51
50
|
await platform_1.platform.deleteLabel(branchPr.number, config.rebaseLabel);
|
|
@@ -62,11 +61,11 @@ async function rebaseCheck(config, branchPr) {
|
|
|
62
61
|
async function deleteBranchSilently(branchName) {
|
|
63
62
|
try {
|
|
64
63
|
await scm_1.scm.deleteBranch(branchName);
|
|
65
|
-
/* v8 ignore start -- needs test */
|
|
66
64
|
}
|
|
67
65
|
catch (err) {
|
|
66
|
+
/* v8 ignore next -- needs test */
|
|
68
67
|
logger_1.logger.debug({ branchName, err }, 'Branch auto-remove failed');
|
|
69
|
-
}
|
|
68
|
+
}
|
|
70
69
|
}
|
|
71
70
|
function userChangedTargetBranch(pr) {
|
|
72
71
|
const oldTargetBranch = pr.bodyStruct?.debugData?.targetBranch;
|
|
@@ -612,13 +611,14 @@ async function processBranch(branchConfig, forceRebase = false) {
|
|
|
612
611
|
config.branchAutomergeFailureMessage = mergeStatus;
|
|
613
612
|
}
|
|
614
613
|
}
|
|
615
|
-
/* v8 ignore start -- needs test */
|
|
616
614
|
}
|
|
617
615
|
catch (err) {
|
|
616
|
+
/* v8 ignore if -- needs test */
|
|
618
617
|
if (err.statusCode === 404) {
|
|
619
618
|
logger_1.logger.debug({ err }, 'Received a 404 error - aborting run');
|
|
620
619
|
throw new Error(error_messages_1.REPOSITORY_CHANGED);
|
|
621
620
|
}
|
|
621
|
+
/* v8 ignore if -- needs test */
|
|
622
622
|
if (err.message === error_messages_1.PLATFORM_RATE_LIMIT_EXCEEDED) {
|
|
623
623
|
logger_1.logger.debug('Passing rate-limit-exceeded error up');
|
|
624
624
|
throw err;
|
|
@@ -627,18 +627,22 @@ async function processBranch(branchConfig, forceRebase = false) {
|
|
|
627
627
|
logger_1.logger.debug('Passing repository-changed error up');
|
|
628
628
|
throw err;
|
|
629
629
|
}
|
|
630
|
+
/* v8 ignore if -- needs test */
|
|
630
631
|
if (err.message?.startsWith('remote: Invalid username or password')) {
|
|
631
632
|
logger_1.logger.debug('Throwing bad credentials');
|
|
632
633
|
throw new Error(error_messages_1.PLATFORM_BAD_CREDENTIALS);
|
|
633
634
|
}
|
|
635
|
+
/* v8 ignore if -- needs test */
|
|
634
636
|
if (err.message?.startsWith('ssh_exchange_identification: Connection closed by remote host')) {
|
|
635
637
|
logger_1.logger.debug('Throwing bad credentials');
|
|
636
638
|
throw new Error(error_messages_1.PLATFORM_BAD_CREDENTIALS);
|
|
637
639
|
}
|
|
640
|
+
/* v8 ignore if -- needs test */
|
|
638
641
|
if (err.message === error_messages_1.PLATFORM_BAD_CREDENTIALS) {
|
|
639
642
|
logger_1.logger.debug('Passing bad-credentials error up');
|
|
640
643
|
throw err;
|
|
641
644
|
}
|
|
645
|
+
/* v8 ignore if -- needs test */
|
|
642
646
|
if (err.message === error_messages_1.PLATFORM_INTEGRATION_UNAUTHORIZED) {
|
|
643
647
|
logger_1.logger.debug('Passing integration-unauthorized error up');
|
|
644
648
|
throw err;
|
|
@@ -647,17 +651,21 @@ async function processBranch(branchConfig, forceRebase = false) {
|
|
|
647
651
|
logger_1.logger.debug('Passing lockfile-error up');
|
|
648
652
|
throw err;
|
|
649
653
|
}
|
|
654
|
+
/* v8 ignore if -- needs test */
|
|
650
655
|
if (err.message?.includes('space left on device')) {
|
|
651
656
|
throw new Error(error_messages_1.SYSTEM_INSUFFICIENT_DISK_SPACE);
|
|
652
657
|
}
|
|
658
|
+
/* v8 ignore if -- needs test */
|
|
653
659
|
if (err.message === error_messages_1.SYSTEM_INSUFFICIENT_DISK_SPACE) {
|
|
654
660
|
logger_1.logger.debug('Passing disk-space error up');
|
|
655
661
|
throw err;
|
|
656
662
|
}
|
|
663
|
+
/* v8 ignore if -- needs test */
|
|
657
664
|
if (err.message.startsWith('Resource not accessible by integration')) {
|
|
658
665
|
logger_1.logger.debug('Passing 403 error up');
|
|
659
666
|
throw err;
|
|
660
667
|
}
|
|
668
|
+
/* v8 ignore next -- needs test */
|
|
661
669
|
if (err.message === error_messages_1.WORKER_FILE_UPDATE_FAILED) {
|
|
662
670
|
logger_1.logger.warn('Error updating branch: update failure');
|
|
663
671
|
}
|
|
@@ -697,7 +705,7 @@ async function processBranch(branchConfig, forceRebase = false) {
|
|
|
697
705
|
result: 'error',
|
|
698
706
|
commitSha,
|
|
699
707
|
};
|
|
700
|
-
}
|
|
708
|
+
}
|
|
701
709
|
try {
|
|
702
710
|
logger_1.logger.debug('Ensuring PR');
|
|
703
711
|
logger_1.logger.debug(`There are ${config.errors.length} errors and ${config.warnings.length} warnings`);
|
|
@@ -828,9 +836,9 @@ async function processBranch(branchConfig, forceRebase = false) {
|
|
|
828
836
|
}
|
|
829
837
|
}
|
|
830
838
|
}
|
|
831
|
-
/* v8 ignore start -- needs test */
|
|
832
839
|
}
|
|
833
840
|
catch (err) {
|
|
841
|
+
/* v8 ignore if -- needs test */
|
|
834
842
|
if (err instanceof external_host_error_1.ExternalHostError ||
|
|
835
843
|
[error_messages_1.PLATFORM_RATE_LIMIT_EXCEEDED, error_messages_1.REPOSITORY_CHANGED].includes(err.message)) {
|
|
836
844
|
logger_1.logger.debug('Passing PR error up');
|
|
@@ -838,7 +846,7 @@ async function processBranch(branchConfig, forceRebase = false) {
|
|
|
838
846
|
}
|
|
839
847
|
// Otherwise don't throw here - we don't want to stop the other renovations
|
|
840
848
|
logger_1.logger.error({ err }, `Error ensuring PR`);
|
|
841
|
-
}
|
|
849
|
+
}
|
|
842
850
|
if (!branchExists) {
|
|
843
851
|
return {
|
|
844
852
|
branchExists: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../lib/workers/repository/update/branch/index.ts"],"names":[],"mappings":";;AA2HA,sCA27BC;;AAtjCD,yCAAoD;AACpD,iCAAiC;AACjC,sDAAyD;AAMzD,yEAW8C;AAC9C,+CAAwD;AACxD,6EAAiF;AAEjF,2DAAwD;AACxD,kEAG8C;AAC9C,0DAAuD;AACvD,sFAAiF;AACjF,gDAAqD;AACrD,kDAAiD;AACjD,wEAI2C;AAC3C,oDAAuD;AACvD,8DAAoD;AACpD,4EAAsD;AACtD,mDAAkE;AAElE,+CAAkD;AAClD,8BAAuD;AACvD,+CAAiD;AACjD,2CAAqD;AACrD,2CAAiD;AACjD,mDAA+C;AAC/C,qDAAoD;AACpD,qCAA+C;AAC/C,4GAAyE;AACzE,+CAAuD;AACvD,uDAAqE;AACrE,mCAAoD;AACpD,yCAA4C;AAC5C,mDAA8D;AAE9D,KAAK,UAAU,WAAW,CACxB,MAAsB,EACtB,QAAY;IAEZ,MAAM,WAAW,GAAG,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC;IAC1D,IAAI,WAAW,EAAE,CAAC;QAChB,eAAM,CAAC,KAAK,CACV,6CAA6C,QAAQ,CAAC,MAAM,EAAE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mB,CAAC,CAAC;IAC7C,CAAC,CAAC,kCAAkC;IACpC,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,OAAO;YACL,YAAY,EAAE,IAAI;YAClB,eAAe;YACf,IAAI,EAAE,QAAQ,EAAE,MAAM;YACtB,MAAM,EAAE,YAAY;YACpB,SAAS;SACV,CAAC;IACJ,CAAC;IACD,OAAO;QACL,YAAY;QACZ,eAAe;QACf,IAAI,EAAE,QAAQ,EAAE,MAAM;QACtB,MAAM,EAAE,MAAM;QACd,SAAS;KACV,CAAC;AACJ,CAAC","sourcesContent":["import { isNonEmptyString } from '@sindresorhus/is';\nimport { DateTime } from 'luxon';\nimport { GlobalConfig } from '../../../../config/global';\nimport {\n type MinimumReleaseAgeBehaviour,\n type RenovateConfig,\n type UpdateType,\n} from '../../../../config/types';\nimport {\n CONFIG_VALIDATION,\n MANAGER_LOCKFILE_ERROR,\n PLATFORM_AUTHENTICATION_ERROR,\n PLATFORM_BAD_CREDENTIALS,\n PLATFORM_INTEGRATION_UNAUTHORIZED,\n PLATFORM_RATE_LIMIT_EXCEEDED,\n REPOSITORY_CHANGED,\n SYSTEM_INSUFFICIENT_DISK_SPACE,\n TEMPORARY_ERROR,\n WORKER_FILE_UPDATE_FAILED,\n} from '../../../../constants/error-messages';\nimport { logger, removeMeta } from '../../../../logger';\nimport { getAdditionalFiles } from '../../../../modules/manager/npm/post-update';\nimport type { Pr } from '../../../../modules/platform';\nimport { platform } from '../../../../modules/platform';\nimport {\n ensureComment,\n ensureCommentRemoval,\n} from '../../../../modules/platform/comment';\nimport { scm } from '../../../../modules/platform/scm';\nimport { ExternalHostError } from '../../../../types/errors/external-host-error';\nimport { getElapsedMs } from '../../../../util/date';\nimport { emojify } from '../../../../util/emoji';\nimport {\n getMergeConfidenceLevel,\n isActiveConfidenceLevel,\n satisfiesConfidenceLevel,\n} from '../../../../util/merge-confidence';\nimport { coerceNumber } from '../../../../util/number';\nimport { toMs } from '../../../../util/pretty-time';\nimport * as template from '../../../../util/template';\nimport { getCount, isLimitReached } from '../../../global/limits';\nimport type { BranchConfig, BranchResult, PrBlockedBy } from '../../../types';\nimport { embedChangelogs } from '../../changelog';\nimport { ensurePr, getPlatformPrOptions } from '../pr';\nimport { checkAutoMerge } from '../pr/automerge';\nimport { setArtifactErrorStatus } from './artifacts';\nimport { tryBranchAutomerge } from './automerge';\nimport { bumpVersions } from './bump-versions';\nimport { prAlreadyExisted } from './check-existing';\nimport { commitFilesToBranch } from './commit';\nimport executePostUpgradeCommands from './execute-post-upgrade-commands';\nimport { getUpdatedPackageFiles } from './get-updated';\nimport { handleClosedPr, handleModifiedPr } from './handle-existing';\nimport { shouldReuseExistingBranch } from './reuse';\nimport { isScheduledNow } from './schedule';\nimport { setConfidence, setStability } from './status-checks';\n\nasync function rebaseCheck(\n config: RenovateConfig,\n branchPr: Pr,\n): Promise<boolean> {\n const titleRebase = branchPr.title?.startsWith('rebase!');\n if (titleRebase) {\n logger.debug(\n `Manual rebase requested via PR title for #${branchPr.number}`,\n );\n return true;\n }\n const labelRebase = !!branchPr.labels?.includes(config.rebaseLabel!);\n if (labelRebase) {\n logger.debug(\n `Manual rebase requested via PR labels for #${branchPr.number}`,\n );\n /* v8 ignore start -- needs test */\n if (GlobalConfig.get('dryRun')) {\n logger.info(\n `DRY-RUN: Would delete label ${config.rebaseLabel!} from #${\n branchPr.number\n }`,\n );\n /* v8 ignore stop -- needs test */\n } else {\n await platform.deleteLabel(branchPr.number, config.rebaseLabel!);\n }\n return true;\n }\n const prRebaseChecked = !!branchPr.bodyStruct?.rebaseRequested;\n if (prRebaseChecked) {\n logger.debug(\n `Manual rebase requested via PR checkbox for #${branchPr.number}`,\n );\n return true;\n }\n\n return false;\n}\n\nasync function deleteBranchSilently(branchName: string): Promise<void> {\n try {\n await scm.deleteBranch(branchName);\n /* v8 ignore start -- needs test */\n } catch (err) {\n logger.debug({ branchName, err }, 'Branch auto-remove failed');\n } /* v8 ignore stop -- needs test */\n}\n\nfunction userChangedTargetBranch(pr: Pr): boolean {\n const oldTargetBranch = pr.bodyStruct?.debugData?.targetBranch;\n if (oldTargetBranch && pr.targetBranch) {\n return pr.targetBranch !== oldTargetBranch;\n }\n return false;\n}\n\nexport interface ProcessBranchResult {\n branchExists: boolean;\n updatesVerified?: boolean;\n prBlockedBy?: PrBlockedBy;\n prNo?: number;\n result: BranchResult;\n commitSha?: string | null;\n}\n\nexport async function processBranch(\n branchConfig: BranchConfig,\n forceRebase = false,\n): Promise<ProcessBranchResult> {\n let commitSha: string | null = null;\n let config: BranchConfig = { ...branchConfig };\n logger.trace({ config }, 'processBranch()');\n let branchExists = await scm.branchExists(config.branchName);\n const dependencyDashboardCheck =\n config.dependencyDashboardChecks?.[config.branchName];\n let updatesVerified = false;\n if (!branchExists && config.branchPrefix !== config.branchPrefixOld) {\n const branchName = config.branchName.replace(\n config.branchPrefix!,\n config.branchPrefixOld!,\n );\n branchExists = await scm.branchExists(branchName);\n if (branchExists) {\n config.branchName = branchName;\n logger.debug('Found existing branch with branchPrefixOld');\n }\n }\n\n if (\n !branchExists &&\n branchConfig.minimumGroupSize &&\n branchConfig.minimumGroupSize > branchConfig.upgrades.length &&\n !dependencyDashboardCheck\n ) {\n logger.debug(\n `Skipping branch creation as minimumGroupSize: ${branchConfig.minimumGroupSize} is not met`,\n );\n return {\n branchExists: false,\n result: 'minimum-group-size-not-met',\n };\n }\n\n let branchPr = await platform.getBranchPr(\n config.branchName,\n config.baseBranch,\n );\n logger.debug(`branchExists=${branchExists}`);\n logger.debug(`dependencyDashboardCheck=${dependencyDashboardCheck!}`);\n if (branchPr) {\n config.rebaseRequested = await rebaseCheck(config, branchPr);\n logger.debug(`PR rebase requested=${config.rebaseRequested}`);\n }\n const keepUpdatedLabel = config.keepUpdatedLabel;\n const artifactErrorTopic = emojify(':warning: Artifact update problem');\n const artifactNoticeTopic = emojify(\n ':information_source: Artifact update notice',\n );\n try {\n // Check if branch already existed\n const existingPr =\n !branchPr || config.automerge\n ? await prAlreadyExisted(config)\n : undefined;\n if (existingPr?.state === 'merged') {\n logger.debug(`Matching PR #${existingPr.number} was merged previously`);\n if (config.automerge) {\n logger.debug('Disabling automerge because PR was merged previously');\n config.automerge = false;\n config.automergedPreviously = true;\n }\n } else if (!branchPr && existingPr && !dependencyDashboardCheck) {\n logger.debug(\n { prTitle: config.prTitle },\n 'Closed PR already exists. Skipping branch.',\n );\n await handleClosedPr(config, existingPr);\n return {\n branchExists: false,\n prNo: existingPr.number,\n result: 'already-existed',\n };\n }\n if (\n !branchExists &&\n branchConfig.pendingChecks &&\n !dependencyDashboardCheck\n ) {\n logger.debug(\n `Branch ${config.branchName} creation is disabled because internalChecksFilter was not met`,\n );\n return {\n branchExists: false,\n result: 'pending',\n };\n }\n if (!branchExists) {\n if (config.mode === 'silent' && !dependencyDashboardCheck) {\n logger.debug(\n `Branch ${config.branchName} creation is disabled because mode=silent`,\n );\n return {\n branchExists,\n result: 'needs-approval',\n };\n }\n if (config.dependencyDashboardApproval && !dependencyDashboardCheck) {\n logger.debug(\n `Branch ${config.branchName} creation is disabled because dependencyDashboardApproval=true`,\n );\n return {\n branchExists,\n result: 'needs-approval',\n };\n }\n }\n\n logger.debug(\n `Open PR Count: ${getCount('ConcurrentPRs')}, Existing Branch Count: ${getCount('Branches')}, Hourly PR Count: ${getCount('HourlyPRs')}`,\n );\n\n if (\n !branchExists &&\n isLimitReached('Branches', branchConfig) &&\n !dependencyDashboardCheck &&\n !config.isVulnerabilityAlert\n ) {\n logger.debug('Reached branch limit - skipping branch creation');\n return {\n branchExists,\n result: 'branch-limit-reached',\n };\n }\n if (\n isLimitReached('Commits') &&\n !dependencyDashboardCheck &&\n !config.isVulnerabilityAlert\n ) {\n logger.debug('Reached commits limit - skipping branch');\n return {\n branchExists,\n prNo: branchPr?.number,\n result: 'commit-limit-reached',\n };\n }\n if (branchExists) {\n // check if branch is labelled to stop\n config.stopUpdating = branchPr?.labels?.includes(\n config.stopUpdatingLabel!,\n );\n\n const prRebaseChecked = !!branchPr?.bodyStruct?.rebaseRequested;\n\n if (branchExists && !dependencyDashboardCheck && !prRebaseChecked) {\n if (config.stopUpdating) {\n logger.info(\n 'Branch updating is skipped because stopUpdatingLabel is present in config',\n );\n return {\n branchExists: true,\n prNo: branchPr?.number,\n result: 'no-work',\n };\n }\n\n if (config.pendingChecks) {\n logger.info(\n 'Branch updating is skipped because internalChecksFilter was not met',\n );\n return {\n branchExists: true,\n prNo: branchPr?.number,\n result: 'pending',\n };\n }\n }\n\n logger.debug('Checking if PR has been edited');\n const branchIsModified = await scm.isBranchModified(\n config.branchName,\n config.baseBranch,\n );\n if (branchPr) {\n logger.debug('Found existing branch PR');\n if (branchPr.state !== 'open') {\n logger.debug(\n 'PR has been closed or merged since this run started - aborting',\n );\n throw new Error(REPOSITORY_CHANGED);\n }\n if (branchIsModified || userChangedTargetBranch(branchPr)) {\n logger.debug(`PR has been edited, PrNo:${branchPr.number}`);\n await handleModifiedPr(config, branchPr);\n if (!(!!dependencyDashboardCheck || config.rebaseRequested)) {\n return {\n branchExists,\n prNo: branchPr.number,\n result: 'pr-edited',\n };\n }\n }\n } else if (branchIsModified) {\n const oldPr = await platform.findPr({\n branchName: config.branchName,\n state: '!open',\n targetBranch: config.baseBranch,\n });\n if (!oldPr) {\n logger.debug('Branch has been edited but found no PR - skipping');\n return {\n branchExists,\n result: 'pr-edited',\n };\n }\n const branchSha = await scm.getBranchCommit(config.branchName);\n const oldPrSha = oldPr?.sha;\n if (!oldPrSha || oldPrSha === branchSha) {\n logger.debug(\n { oldPrNumber: oldPr.number, oldPrSha, branchSha },\n 'Found old PR matching this branch - will override it',\n );\n } else {\n logger.debug(\n { oldPrNumber: oldPr.number, oldPrSha, branchSha },\n 'Found old PR but the SHA is different',\n );\n return {\n branchExists,\n result: 'pr-edited',\n };\n }\n }\n }\n\n // Check schedule\n config.isScheduledNow = isScheduledNow(config, 'schedule');\n if (!config.isScheduledNow && !dependencyDashboardCheck) {\n if (!branchExists) {\n logger.debug('Skipping branch creation as not within schedule');\n return {\n branchExists,\n result: 'not-scheduled',\n };\n }\n if (config.updateNotScheduled === false && !config.rebaseRequested) {\n logger.debug('Skipping branch update as not within schedule');\n return {\n branchExists,\n prNo: branchPr?.number,\n result: 'update-not-scheduled',\n };\n }\n if (\n !branchPr &&\n !(config.automerge && config.automergeType === 'branch') // if branch is configured for automerge there's no need for a PR\n ) {\n logger.debug('Skipping PR creation out of schedule');\n return {\n branchExists,\n result: 'not-scheduled',\n };\n }\n logger.debug(\n 'Branch + PR exists but is not scheduled -- will update if necessary',\n );\n }\n //stability checks\n if (\n config.upgrades.some(\n (upgrade) =>\n isNonEmptyString(upgrade.minimumReleaseAge) ||\n isActiveConfidenceLevel(upgrade.minimumConfidence!),\n )\n ) {\n const depNamesWithoutReleaseTimestamp: Record<\n MinimumReleaseAgeBehaviour,\n {\n depName: string;\n updateType: UpdateType;\n }[]\n > = {\n 'timestamp-required': [],\n 'timestamp-optional': [],\n };\n\n // Only set a stability status check if one or more of the updates contain\n // both a minimumReleaseAge setting and a releaseTimestamp\n config.stabilityStatus = 'green';\n // Default to 'success' but set 'pending' if any update is pending\n for (const upgrade of config.upgrades) {\n const minimumReleaseAgeMs = isNonEmptyString(upgrade.minimumReleaseAge)\n ? coerceNumber(toMs(upgrade.minimumReleaseAge), 0)\n : 0;\n\n if (minimumReleaseAgeMs) {\n const minimumReleaseAgeBehaviour: MinimumReleaseAgeBehaviour =\n upgrade.minimumReleaseAgeBehaviour ?? 'timestamp-required';\n\n // regardless of the value of `minimumReleaseAgeBehaviour`, if there is a timestamp, we will process it according to `minimumReleaseAge`\n if (upgrade.releaseTimestamp) {\n const timeElapsed = getElapsedMs(upgrade.releaseTimestamp);\n if (timeElapsed < minimumReleaseAgeMs) {\n logger.debug(\n {\n depName: upgrade.depName,\n timeElapsed,\n minimumReleaseAge: upgrade.minimumReleaseAge,\n },\n 'Update has not passed minimum release age',\n );\n config.stabilityStatus = 'yellow';\n continue;\n }\n } else {\n // if we're set to `minimumReleaseAgeBehaviour=timestamp-required`, and there isn't a timestamp, always mark the update as pending\n if (minimumReleaseAgeBehaviour === 'timestamp-required') {\n depNamesWithoutReleaseTimestamp['timestamp-required'].push({\n depName: upgrade.depName!,\n updateType: upgrade.updateType!,\n });\n config.stabilityStatus = 'yellow';\n continue;\n } else {\n // if there is no timestamp, and we're running in `optional` mode, we can allow it, but make sure to warn the user\n depNamesWithoutReleaseTimestamp['timestamp-optional'].push({\n depName: upgrade.depName!,\n updateType: upgrade.updateType!,\n });\n }\n }\n }\n const datasource = upgrade.datasource!;\n const depName = upgrade.depName!;\n const packageName = upgrade.packageName!;\n const minimumConfidence = upgrade.minimumConfidence!;\n const updateType = upgrade.updateType!;\n const currentVersion = upgrade.currentVersion!;\n const newVersion = upgrade.newVersion!;\n if (isActiveConfidenceLevel(minimumConfidence)) {\n const confidence =\n (await getMergeConfidenceLevel(\n datasource,\n packageName,\n currentVersion,\n newVersion,\n updateType,\n )) ?? 'neutral';\n if (satisfiesConfidenceLevel(confidence, minimumConfidence)) {\n config.confidenceStatus = 'green';\n } else {\n logger.debug(\n { depName, confidence, minimumConfidence },\n 'Update does not meet minimum confidence scores',\n );\n config.confidenceStatus = 'yellow';\n continue;\n }\n }\n }\n\n if (depNamesWithoutReleaseTimestamp['timestamp-required'].length) {\n logger.debug(\n { updates: depNamesWithoutReleaseTimestamp['timestamp-required'] },\n `Marking ${depNamesWithoutReleaseTimestamp['timestamp-required'].length} release(s) as pending, as they do not have a releaseTimestamp and we're running with minimumReleaseAgeBehaviour=timestamp-required`,\n );\n }\n if (depNamesWithoutReleaseTimestamp['timestamp-optional'].length) {\n logger.once.warn(\n \"Some upgrade(s) did not have a releaseTimestamp, but as we're running with minimumReleaseAgeBehaviour=timestamp-optional, proceeding. See debug logs for more information\",\n );\n logger.debug(\n { updates: depNamesWithoutReleaseTimestamp['timestamp-optional'] },\n `${depNamesWithoutReleaseTimestamp['timestamp-optional'].length} upgrade(s) did not have a releaseTimestamp, but as we're running with minimumReleaseAgeBehaviour=timestamp-optional, proceeding`,\n );\n }\n\n // Don't create a branch if we know it will be status 'pending'\n if (\n !dependencyDashboardCheck &&\n !branchExists &&\n config.stabilityStatus === 'yellow' &&\n ['not-pending', 'status-success'].includes(config.prCreation!)\n ) {\n logger.debug(\n 'Skipping branch creation due to internal status checks not met',\n );\n return {\n branchExists,\n result: 'pending',\n };\n }\n }\n\n let userRebaseRequested =\n dependencyDashboardCheck === 'rebase' ||\n !!config.dependencyDashboardRebaseAllOpen ||\n !!config.rebaseRequested;\n const userApproveAllPendingPR = !!config.dependencyDashboardAllPending;\n const userOpenAllRateLimtedPR = !!config.dependencyDashboardAllRateLimited;\n if (forceRebase) {\n logger.debug('Force rebase because branch needs updating');\n config.reuseExistingBranch = false;\n } else if (userRebaseRequested) {\n logger.debug('User has requested rebase');\n config.reuseExistingBranch = false;\n } else if (dependencyDashboardCheck === 'global-config') {\n logger.debug(`Manual create/rebase requested via checkedBranches`);\n config.reuseExistingBranch = false;\n userRebaseRequested = true;\n } else if (userApproveAllPendingPR) {\n logger.debug(\n 'A user manually approved all pending PRs via the Dependency Dashboard.',\n );\n } else if (userOpenAllRateLimtedPR) {\n logger.debug(\n 'A user manually approved all rate-limited PRs via the Dependency Dashboard.',\n );\n } else if (\n branchExists &&\n config.rebaseWhen === 'never' &&\n !(keepUpdatedLabel && branchPr?.labels?.includes(keepUpdatedLabel)) &&\n !dependencyDashboardCheck\n ) {\n logger.debug('rebaseWhen=never so skipping branch update check');\n return {\n branchExists,\n prNo: branchPr?.number,\n result: 'no-work',\n };\n }\n // if the base branch has been changed by user in renovate config, rebase onto the new baseBranch\n // we have already confirmed earlier that branch isn't modified, so its safe to use targetBranch here\n else if (\n branchPr?.targetBranch &&\n branchPr.targetBranch !== config.baseBranch\n ) {\n logger.debug(\n 'Base branch changed by user, rebasing the branch onto new base',\n );\n config.reuseExistingBranch = false;\n } else if (config.cacheFingerprintMatch === 'no-match') {\n logger.debug(\n 'Cache fingerprint does not match, cannot reuse existing branch',\n );\n config.reuseExistingBranch = false;\n } else {\n config = await shouldReuseExistingBranch(config);\n }\n // TODO: types (#22198)\n logger.debug(`Using reuseExistingBranch: ${config.reuseExistingBranch!}`);\n if (\n !(\n config.reuseExistingBranch && config.cacheFingerprintMatch === 'matched'\n )\n ) {\n await scm.checkoutBranch(config.baseBranch);\n const res = await getUpdatedPackageFiles(config);\n if (res.artifactErrors && config.artifactErrors) {\n res.artifactErrors = config.artifactErrors.concat(res.artifactErrors);\n }\n config = { ...config, ...res };\n if (config.updatedPackageFiles?.length) {\n logger.debug(\n `Updated ${config.updatedPackageFiles.length} package files`,\n );\n if (config.reuseExistingBranch && !forceRebase) {\n logger.debug(\n 'Existing branch needs updating. Restarting processBranch() with a clean branch',\n );\n return processBranch(branchConfig, true);\n }\n } else {\n logger.debug('No package files need updating');\n }\n const additionalFiles = await getAdditionalFiles(\n config,\n branchConfig.packageFiles!,\n );\n config.artifactErrors = (config.artifactErrors ?? []).concat(\n additionalFiles.artifactErrors,\n );\n config.updatedArtifacts = (config.updatedArtifacts ?? []).concat(\n additionalFiles.updatedArtifacts,\n );\n if (config.updatedArtifacts?.length) {\n logger.debug(\n {\n updatedArtifacts: config.updatedArtifacts.map((f) =>\n f.type === 'deletion' ? `${f.path} (delete)` : f.path,\n ),\n },\n `Updated ${config.updatedArtifacts.length} lock files`,\n );\n if (config.reuseExistingBranch && !forceRebase) {\n logger.debug(\n 'Existing branch needs updating. Restarting processBranch() with a clean branch',\n );\n return processBranch(branchConfig, true);\n }\n } else {\n logger.debug('No updated lock files in branch');\n }\n if (config.fetchChangeLogs === 'branch') {\n await embedChangelogs(config.upgrades);\n }\n\n const postUpgradeCommandResults =\n await executePostUpgradeCommands(config);\n\n if (postUpgradeCommandResults !== null) {\n const { updatedArtifacts, artifactErrors } = postUpgradeCommandResults;\n config.updatedArtifacts = updatedArtifacts;\n config.artifactErrors = artifactErrors;\n }\n\n // modifies the file changes in place to allow having a version bump in a packageFile or artifact\n await bumpVersions(config);\n\n removeMeta(['dep']);\n\n if (config.artifactErrors?.length) {\n if (config.releaseTimestamp) {\n logger.debug(`Branch timestamp: ` + config.releaseTimestamp);\n const releaseTimestamp = DateTime.fromISO(config.releaseTimestamp);\n if (releaseTimestamp.plus({ hours: 2 }) < DateTime.local()) {\n logger.debug(\n 'PR is older than 2 hours, raise PR with lock file errors',\n );\n } else if (branchExists) {\n logger.debug(\n 'PR is less than 2 hours old but branchExists so updating anyway',\n );\n } else {\n logger.debug(\n 'PR is less than 2 hours old - raise error instead of PR',\n );\n throw new Error(MANAGER_LOCKFILE_ERROR);\n }\n } else {\n logger.debug('PR has no releaseTimestamp');\n }\n } else if (config.updatedArtifacts?.length && branchPr) {\n // If there are artifacts, no errors, and an existing PR then ensure any artifacts error comment is removed\n if (GlobalConfig.get('dryRun')) {\n logger.info(\n `DRY-RUN: Would ensure comment removal in PR #${branchPr.number}`,\n );\n } else {\n // Remove artifacts error comment only if this run has successfully updated artifacts\n await ensureCommentRemoval({\n type: 'by-topic',\n number: branchPr.number,\n topic: artifactErrorTopic,\n });\n\n if (!config.artifactNotices?.length) {\n await ensureCommentRemoval({\n type: 'by-topic',\n number: branchPr.number,\n topic: artifactNoticeTopic,\n });\n }\n }\n }\n const forcedManually = userRebaseRequested || !branchExists;\n\n config.isConflicted ??=\n branchExists &&\n (await scm.isBranchConflicted(config.baseBranch, config.branchName));\n config.forceCommit = forcedManually || config.isConflicted;\n\n // compile commit message with body, which maybe needs changelogs\n if (config.commitBody) {\n // changelog is on first upgrade\n config.commitMessage = `${config.commitMessage!}\\n\\n${template.compile(\n config.commitBody,\n {\n ...config,\n logJSON: config.upgrades[0].logJSON,\n releases: config.upgrades[0].releases,\n },\n )}`;\n\n logger.trace(`commitMessage: ` + JSON.stringify(config.commitMessage));\n }\n\n commitSha = await commitFilesToBranch(config);\n // Checkout to base branch to ensure that the next branch processing always starts with git being on the baseBranch\n // baseBranch is not checked out at the start of processBranch() due to pull/16246\n await scm.checkoutBranch(config.baseBranch);\n updatesVerified = true;\n }\n\n if (branchPr) {\n const platformPrOptions = getPlatformPrOptions(config);\n if (\n platformPrOptions.usePlatformAutomerge &&\n platform.reattemptPlatformAutomerge\n ) {\n if (GlobalConfig.get('dryRun')) {\n logger.info(\n `DRY-RUN: Would reattempt platform automerge for PR #${branchPr.number}`,\n );\n } else {\n await platform.reattemptPlatformAutomerge({\n number: branchPr.number,\n platformPrOptions,\n });\n }\n }\n if (platform.refreshPr) {\n await platform.refreshPr(branchPr.number);\n }\n }\n if (!commitSha && !branchExists) {\n return {\n branchExists,\n result: 'no-work',\n };\n }\n if (commitSha) {\n const action = branchExists ? 'updated' : 'created';\n logger.info({ commitSha }, `Branch ${action}`);\n }\n // Set branch statuses\n await setArtifactErrorStatus(config);\n await setStability(config);\n await setConfidence(config);\n\n // new commit means status check are pretty sure pending but maybe not reported yet\n // if PR has not been created + new commit + prCreation !== immediate skip\n // but do not break when there are artifact errors\n if (\n !branchPr &&\n !config.artifactErrors?.length &&\n !userRebaseRequested &&\n commitSha &&\n config.prCreation !== 'immediate'\n ) {\n logger.debug(`Branch status pending, current sha: ${commitSha}`);\n return {\n branchExists: true,\n updatesVerified,\n result: 'pending',\n commitSha,\n };\n }\n\n // Try to automerge branch and finish if successful, but only if branch already existed before this run\n // skip if we have a non-immediate pr and there is an existing PR,\n // we want to update the PR and skip the Auto merge since status checks aren't done yet\n if (!config.artifactErrors?.length && (!commitSha || config.ignoreTests)) {\n const mergeStatus = await tryBranchAutomerge(config);\n logger.debug(`mergeStatus=${mergeStatus}`);\n if (mergeStatus === 'automerged') {\n if (GlobalConfig.get('dryRun')) {\n logger.info('DRY-RUN: Would delete branch' + config.branchName);\n } else {\n await deleteBranchSilently(config.branchName);\n }\n logger.debug('Branch is automerged - returning');\n return { branchExists: false, result: 'automerged' };\n }\n if (mergeStatus === 'off schedule') {\n if (userRebaseRequested) {\n config.forcePr = true;\n } else {\n logger.debug(\n 'Branch cannot automerge now because automergeSchedule is off schedule - skipping',\n );\n return {\n branchExists,\n result: 'not-scheduled',\n commitSha,\n };\n }\n }\n if (\n mergeStatus === 'stale' &&\n ['conflicted', 'never'].includes(config.rebaseWhen!) &&\n /* v8 ignore next -- needs test */\n !(keepUpdatedLabel && branchPr?.labels?.includes(keepUpdatedLabel))\n ) {\n logger.warn(\n 'Branch cannot automerge because it is behind base branch and rebaseWhen setting disallows rebasing - raising a PR instead',\n );\n config.forcePr = true;\n config.branchAutomergeFailureMessage = mergeStatus;\n }\n if (\n mergeStatus === 'automerge aborted - PR exists' ||\n mergeStatus === 'branch status error' ||\n mergeStatus === 'failed'\n ) {\n logger.debug(\n `Branch automerge not possible, mergeStatus:${mergeStatus}`,\n );\n config.forcePr = true;\n config.branchAutomergeFailureMessage = mergeStatus;\n }\n }\n /* v8 ignore start -- needs test */\n } catch (err) {\n if (err.statusCode === 404) {\n logger.debug({ err }, 'Received a 404 error - aborting run');\n throw new Error(REPOSITORY_CHANGED);\n }\n if (err.message === PLATFORM_RATE_LIMIT_EXCEEDED) {\n logger.debug('Passing rate-limit-exceeded error up');\n throw err;\n }\n if (err.message === REPOSITORY_CHANGED) {\n logger.debug('Passing repository-changed error up');\n throw err;\n }\n if (err.message?.startsWith('remote: Invalid username or password')) {\n logger.debug('Throwing bad credentials');\n throw new Error(PLATFORM_BAD_CREDENTIALS);\n }\n if (\n err.message?.startsWith(\n 'ssh_exchange_identification: Connection closed by remote host',\n )\n ) {\n logger.debug('Throwing bad credentials');\n throw new Error(PLATFORM_BAD_CREDENTIALS);\n }\n if (err.message === PLATFORM_BAD_CREDENTIALS) {\n logger.debug('Passing bad-credentials error up');\n throw err;\n }\n if (err.message === PLATFORM_INTEGRATION_UNAUTHORIZED) {\n logger.debug('Passing integration-unauthorized error up');\n throw err;\n }\n if (err.message === MANAGER_LOCKFILE_ERROR) {\n logger.debug('Passing lockfile-error up');\n throw err;\n }\n if (err.message?.includes('space left on device')) {\n throw new Error(SYSTEM_INSUFFICIENT_DISK_SPACE);\n }\n if (err.message === SYSTEM_INSUFFICIENT_DISK_SPACE) {\n logger.debug('Passing disk-space error up');\n throw err;\n }\n if (err.message.startsWith('Resource not accessible by integration')) {\n logger.debug('Passing 403 error up');\n throw err;\n }\n if (err.message === WORKER_FILE_UPDATE_FAILED) {\n logger.warn('Error updating branch: update failure');\n } else if (err.message.startsWith('bundler-')) {\n // we have already warned inside the bundler artifacts error handling, so just return\n return {\n branchExists: true,\n updatesVerified,\n prNo: branchPr?.number,\n result: 'error',\n commitSha,\n };\n } else if (\n err.messagee &&\n err.message.includes('fatal: Authentication failed')\n ) {\n throw new Error(PLATFORM_AUTHENTICATION_ERROR);\n } else if (err.message?.includes('fatal: bad revision')) {\n logger.debug({ err }, 'Aborting job due to bad revision error');\n throw new Error(REPOSITORY_CHANGED);\n } else if (err.message === CONFIG_VALIDATION) {\n logger.debug('Passing config validation error up');\n throw err;\n } else if (err.message === TEMPORARY_ERROR) {\n logger.debug('Passing TEMPORARY_ERROR error up');\n throw err;\n } else if (!(err instanceof ExternalHostError)) {\n logger.warn({ err }, `Error updating branch`);\n }\n // Don't throw here - we don't want to stop the other renovations\n return {\n branchExists,\n prNo: branchPr?.number,\n result: 'error',\n commitSha,\n };\n } /* v8 ignore stop -- needs test */\n try {\n logger.debug('Ensuring PR');\n logger.debug(\n `There are ${config.errors!.length} errors and ${\n config.warnings!.length\n } warnings`,\n );\n const ensurePrResult = await ensurePr(config);\n if (ensurePrResult.type === 'without-pr') {\n const { prBlockedBy } = ensurePrResult;\n branchPr = null;\n if (prBlockedBy === 'RateLimited' && !config.isVulnerabilityAlert) {\n logger.debug('Reached PR limit - skipping PR creation');\n return {\n branchExists,\n prBlockedBy,\n result: 'pr-limit-reached',\n commitSha,\n };\n }\n // TODO: ensurePr should check for automerge itself (#9719)\n if (prBlockedBy === 'NeedsApproval') {\n return {\n branchExists,\n prBlockedBy,\n result: 'needs-pr-approval',\n commitSha,\n };\n }\n if (prBlockedBy === 'AwaitingTests') {\n return {\n branchExists,\n prBlockedBy,\n result: 'pending',\n commitSha,\n };\n }\n if (prBlockedBy === 'BranchAutomerge') {\n return {\n branchExists,\n prBlockedBy,\n result: 'done',\n commitSha,\n };\n }\n if (prBlockedBy === 'Error') {\n return {\n branchExists,\n prBlockedBy,\n result: 'error',\n commitSha,\n };\n }\n logger.warn({ prBlockedBy }, 'Unknown PrBlockedBy result');\n return {\n branchExists,\n prBlockedBy,\n result: 'error',\n commitSha,\n };\n }\n if (ensurePrResult.type === 'with-pr') {\n const { pr } = ensurePrResult;\n branchPr = pr;\n if (config.artifactErrors?.length) {\n logger.warn(\n { artifactErrors: config.artifactErrors },\n 'artifactErrors',\n );\n let content = `Renovate failed to update `;\n content +=\n config.artifactErrors.length > 1 ? 'artifacts' : 'an artifact';\n content += ' related to this branch. ';\n content += template.compile(\n config.userStrings!.artifactErrorWarning,\n config,\n );\n content += emojify(\n `\\n\\n:recycle: Renovate will retry this branch, including artifacts, only when one of the following happens:\\n\\n`,\n );\n content +=\n ' - any of the package files in this branch needs updating, or \\n';\n content += ' - the branch becomes conflicted, or\\n';\n content +=\n ' - you click the rebase/retry checkbox if found above, or\\n';\n content +=\n ' - you rename this PR\\'s title to start with \"rebase!\" to trigger it manually';\n content += '\\n\\nThe artifact failure details are included below:\\n\\n';\n // TODO: types (#22198)\n config.artifactErrors.forEach((error) => {\n content += `##### File name: ${error.lockFile!}\\n\\n`;\n content += `\\`\\`\\`\\n${error.stderr!}\\n\\`\\`\\`\\n\\n`;\n });\n content = platform.massageMarkdown(content, config.rebaseLabel);\n if (\n !(\n config.suppressNotifications!.includes('artifactErrors') ||\n config.suppressNotifications!.includes('lockFileErrors')\n )\n ) {\n if (GlobalConfig.get('dryRun')) {\n logger.info(\n `DRY-RUN: Would ensure lock file error comment in PR #${pr.number}`,\n );\n } else {\n await ensureComment({\n number: pr.number,\n topic: artifactErrorTopic,\n content,\n });\n }\n }\n } else {\n if (config.artifactNotices?.length) {\n const contentLines: string[] = [];\n for (const notice of config.artifactNotices) {\n contentLines.push(`##### File name: ${notice.file}`);\n contentLines.push(notice.message);\n }\n const content = contentLines.join('\\n\\n');\n await ensureComment({\n number: pr.number,\n topic: artifactNoticeTopic,\n content,\n });\n }\n\n if (config.automerge) {\n logger.debug('PR is configured for automerge');\n // skip automerge if there is a new commit since status checks aren't done yet\n if (config.ignoreTests === true || !commitSha) {\n logger.debug('checking auto-merge');\n const prAutomergeResult = await checkAutoMerge(pr, config);\n if (prAutomergeResult?.automerged) {\n return {\n branchExists,\n result: 'automerged',\n commitSha,\n };\n }\n }\n } else {\n logger.debug('PR is not configured for automerge');\n }\n }\n }\n /* v8 ignore start -- needs test */\n } catch (err) {\n if (\n err instanceof ExternalHostError ||\n [PLATFORM_RATE_LIMIT_EXCEEDED, REPOSITORY_CHANGED].includes(err.message)\n ) {\n logger.debug('Passing PR error up');\n throw err;\n }\n // Otherwise don't throw here - we don't want to stop the other renovations\n logger.error({ err }, `Error ensuring PR`);\n } /* v8 ignore stop -- needs test */\n if (!branchExists) {\n return {\n branchExists: true,\n updatesVerified,\n prNo: branchPr?.number,\n result: 'pr-created',\n commitSha,\n };\n }\n return {\n branchExists,\n updatesVerified,\n prNo: branchPr?.number,\n result: 'done',\n commitSha,\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../lib/workers/repository/update/branch/index.ts"],"names":[],"mappings":";;AA0HA,sCAo8BC;;AA9jCD,yCAAoD;AACpD,iCAAiC;AACjC,sDAAyD;AAMzD,yEAW8C;AAC9C,+CAAwD;AACxD,6EAAiF;AAEjF,2DAAwD;AACxD,kEAG8C;AAC9C,0DAAuD;AACvD,sFAAiF;AACjF,gDAAqD;AACrD,kDAAiD;AACjD,wEAI2C;AAC3C,oDAAuD;AACvD,8DAAoD;AACpD,4EAAsD;AACtD,mDAAkE;AAElE,+CAAkD;AAClD,8BAAuD;AACvD,+CAAiD;AACjD,2CAAqD;AACrD,2CAAiD;AACjD,mDAA+C;AAC/C,qDAAoD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CAAC,KAAK,CAAC,oCAAoC,CAAC,CAAC;gBACrD,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,gCAAgC;QAChC,IACE,GAAG,YAAY,uCAAiB;YAChC,CAAC,6CAA4B,EAAE,mCAAkB,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,EACxE,CAAC;YACD,eAAM,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC;YACpC,MAAM,GAAG,CAAC;QACZ,CAAC;QACD,2EAA2E;QAC3E,eAAM,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,EAAE,mBAAmB,CAAC,CAAC;IAC7C,CAAC;IACD,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,OAAO;YACL,YAAY,EAAE,IAAI;YAClB,eAAe;YACf,IAAI,EAAE,QAAQ,EAAE,MAAM;YACtB,MAAM,EAAE,YAAY;YACpB,SAAS;SACV,CAAC;IACJ,CAAC;IACD,OAAO;QACL,YAAY;QACZ,eAAe;QACf,IAAI,EAAE,QAAQ,EAAE,MAAM;QACtB,MAAM,EAAE,MAAM;QACd,SAAS;KACV,CAAC;AACJ,CAAC","sourcesContent":["import { isNonEmptyString } from '@sindresorhus/is';\nimport { DateTime } from 'luxon';\nimport { GlobalConfig } from '../../../../config/global';\nimport {\n type MinimumReleaseAgeBehaviour,\n type RenovateConfig,\n type UpdateType,\n} from '../../../../config/types';\nimport {\n CONFIG_VALIDATION,\n MANAGER_LOCKFILE_ERROR,\n PLATFORM_AUTHENTICATION_ERROR,\n PLATFORM_BAD_CREDENTIALS,\n PLATFORM_INTEGRATION_UNAUTHORIZED,\n PLATFORM_RATE_LIMIT_EXCEEDED,\n REPOSITORY_CHANGED,\n SYSTEM_INSUFFICIENT_DISK_SPACE,\n TEMPORARY_ERROR,\n WORKER_FILE_UPDATE_FAILED,\n} from '../../../../constants/error-messages';\nimport { logger, removeMeta } from '../../../../logger';\nimport { getAdditionalFiles } from '../../../../modules/manager/npm/post-update';\nimport type { Pr } from '../../../../modules/platform';\nimport { platform } from '../../../../modules/platform';\nimport {\n ensureComment,\n ensureCommentRemoval,\n} from '../../../../modules/platform/comment';\nimport { scm } from '../../../../modules/platform/scm';\nimport { ExternalHostError } from '../../../../types/errors/external-host-error';\nimport { getElapsedMs } from '../../../../util/date';\nimport { emojify } from '../../../../util/emoji';\nimport {\n getMergeConfidenceLevel,\n isActiveConfidenceLevel,\n satisfiesConfidenceLevel,\n} from '../../../../util/merge-confidence';\nimport { coerceNumber } from '../../../../util/number';\nimport { toMs } from '../../../../util/pretty-time';\nimport * as template from '../../../../util/template';\nimport { getCount, isLimitReached } from '../../../global/limits';\nimport type { BranchConfig, BranchResult, PrBlockedBy } from '../../../types';\nimport { embedChangelogs } from '../../changelog';\nimport { ensurePr, getPlatformPrOptions } from '../pr';\nimport { checkAutoMerge } from '../pr/automerge';\nimport { setArtifactErrorStatus } from './artifacts';\nimport { tryBranchAutomerge } from './automerge';\nimport { bumpVersions } from './bump-versions';\nimport { prAlreadyExisted } from './check-existing';\nimport { commitFilesToBranch } from './commit';\nimport executePostUpgradeCommands from './execute-post-upgrade-commands';\nimport { getUpdatedPackageFiles } from './get-updated';\nimport { handleClosedPr, handleModifiedPr } from './handle-existing';\nimport { shouldReuseExistingBranch } from './reuse';\nimport { isScheduledNow } from './schedule';\nimport { setConfidence, setStability } from './status-checks';\n\nasync function rebaseCheck(\n config: RenovateConfig,\n branchPr: Pr,\n): Promise<boolean> {\n const titleRebase = branchPr.title?.startsWith('rebase!');\n if (titleRebase) {\n logger.debug(\n `Manual rebase requested via PR title for #${branchPr.number}`,\n );\n return true;\n }\n const labelRebase = !!branchPr.labels?.includes(config.rebaseLabel!);\n if (labelRebase) {\n logger.debug(\n `Manual rebase requested via PR labels for #${branchPr.number}`,\n );\n /* v8 ignore next -- needs test */\n if (GlobalConfig.get('dryRun')) {\n logger.info(\n `DRY-RUN: Would delete label ${config.rebaseLabel!} from #${\n branchPr.number\n }`,\n );\n } else {\n await platform.deleteLabel(branchPr.number, config.rebaseLabel!);\n }\n return true;\n }\n const prRebaseChecked = !!branchPr.bodyStruct?.rebaseRequested;\n if (prRebaseChecked) {\n logger.debug(\n `Manual rebase requested via PR checkbox for #${branchPr.number}`,\n );\n return true;\n }\n\n return false;\n}\n\nasync function deleteBranchSilently(branchName: string): Promise<void> {\n try {\n await scm.deleteBranch(branchName);\n } catch (err) {\n /* v8 ignore next -- needs test */\n logger.debug({ branchName, err }, 'Branch auto-remove failed');\n }\n}\n\nfunction userChangedTargetBranch(pr: Pr): boolean {\n const oldTargetBranch = pr.bodyStruct?.debugData?.targetBranch;\n if (oldTargetBranch && pr.targetBranch) {\n return pr.targetBranch !== oldTargetBranch;\n }\n return false;\n}\n\nexport interface ProcessBranchResult {\n branchExists: boolean;\n updatesVerified?: boolean;\n prBlockedBy?: PrBlockedBy;\n prNo?: number;\n result: BranchResult;\n commitSha?: string | null;\n}\n\nexport async function processBranch(\n branchConfig: BranchConfig,\n forceRebase = false,\n): Promise<ProcessBranchResult> {\n let commitSha: string | null = null;\n let config: BranchConfig = { ...branchConfig };\n logger.trace({ config }, 'processBranch()');\n let branchExists = await scm.branchExists(config.branchName);\n const dependencyDashboardCheck =\n config.dependencyDashboardChecks?.[config.branchName];\n let updatesVerified = false;\n if (!branchExists && config.branchPrefix !== config.branchPrefixOld) {\n const branchName = config.branchName.replace(\n config.branchPrefix!,\n config.branchPrefixOld!,\n );\n branchExists = await scm.branchExists(branchName);\n if (branchExists) {\n config.branchName = branchName;\n logger.debug('Found existing branch with branchPrefixOld');\n }\n }\n\n if (\n !branchExists &&\n branchConfig.minimumGroupSize &&\n branchConfig.minimumGroupSize > branchConfig.upgrades.length &&\n !dependencyDashboardCheck\n ) {\n logger.debug(\n `Skipping branch creation as minimumGroupSize: ${branchConfig.minimumGroupSize} is not met`,\n );\n return {\n branchExists: false,\n result: 'minimum-group-size-not-met',\n };\n }\n\n let branchPr = await platform.getBranchPr(\n config.branchName,\n config.baseBranch,\n );\n logger.debug(`branchExists=${branchExists}`);\n logger.debug(`dependencyDashboardCheck=${dependencyDashboardCheck!}`);\n if (branchPr) {\n config.rebaseRequested = await rebaseCheck(config, branchPr);\n logger.debug(`PR rebase requested=${config.rebaseRequested}`);\n }\n const keepUpdatedLabel = config.keepUpdatedLabel;\n const artifactErrorTopic = emojify(':warning: Artifact update problem');\n const artifactNoticeTopic = emojify(\n ':information_source: Artifact update notice',\n );\n try {\n // Check if branch already existed\n const existingPr =\n !branchPr || config.automerge\n ? await prAlreadyExisted(config)\n : undefined;\n if (existingPr?.state === 'merged') {\n logger.debug(`Matching PR #${existingPr.number} was merged previously`);\n if (config.automerge) {\n logger.debug('Disabling automerge because PR was merged previously');\n config.automerge = false;\n config.automergedPreviously = true;\n }\n } else if (!branchPr && existingPr && !dependencyDashboardCheck) {\n logger.debug(\n { prTitle: config.prTitle },\n 'Closed PR already exists. Skipping branch.',\n );\n await handleClosedPr(config, existingPr);\n return {\n branchExists: false,\n prNo: existingPr.number,\n result: 'already-existed',\n };\n }\n if (\n !branchExists &&\n branchConfig.pendingChecks &&\n !dependencyDashboardCheck\n ) {\n logger.debug(\n `Branch ${config.branchName} creation is disabled because internalChecksFilter was not met`,\n );\n return {\n branchExists: false,\n result: 'pending',\n };\n }\n if (!branchExists) {\n if (config.mode === 'silent' && !dependencyDashboardCheck) {\n logger.debug(\n `Branch ${config.branchName} creation is disabled because mode=silent`,\n );\n return {\n branchExists,\n result: 'needs-approval',\n };\n }\n if (config.dependencyDashboardApproval && !dependencyDashboardCheck) {\n logger.debug(\n `Branch ${config.branchName} creation is disabled because dependencyDashboardApproval=true`,\n );\n return {\n branchExists,\n result: 'needs-approval',\n };\n }\n }\n\n logger.debug(\n `Open PR Count: ${getCount('ConcurrentPRs')}, Existing Branch Count: ${getCount('Branches')}, Hourly PR Count: ${getCount('HourlyPRs')}`,\n );\n\n if (\n !branchExists &&\n isLimitReached('Branches', branchConfig) &&\n !dependencyDashboardCheck &&\n !config.isVulnerabilityAlert\n ) {\n logger.debug('Reached branch limit - skipping branch creation');\n return {\n branchExists,\n result: 'branch-limit-reached',\n };\n }\n if (\n isLimitReached('Commits') &&\n !dependencyDashboardCheck &&\n !config.isVulnerabilityAlert\n ) {\n logger.debug('Reached commits limit - skipping branch');\n return {\n branchExists,\n prNo: branchPr?.number,\n result: 'commit-limit-reached',\n };\n }\n if (branchExists) {\n // check if branch is labelled to stop\n config.stopUpdating = branchPr?.labels?.includes(\n config.stopUpdatingLabel!,\n );\n\n const prRebaseChecked = !!branchPr?.bodyStruct?.rebaseRequested;\n\n if (branchExists && !dependencyDashboardCheck && !prRebaseChecked) {\n if (config.stopUpdating) {\n logger.info(\n 'Branch updating is skipped because stopUpdatingLabel is present in config',\n );\n return {\n branchExists: true,\n prNo: branchPr?.number,\n result: 'no-work',\n };\n }\n\n if (config.pendingChecks) {\n logger.info(\n 'Branch updating is skipped because internalChecksFilter was not met',\n );\n return {\n branchExists: true,\n prNo: branchPr?.number,\n result: 'pending',\n };\n }\n }\n\n logger.debug('Checking if PR has been edited');\n const branchIsModified = await scm.isBranchModified(\n config.branchName,\n config.baseBranch,\n );\n if (branchPr) {\n logger.debug('Found existing branch PR');\n if (branchPr.state !== 'open') {\n logger.debug(\n 'PR has been closed or merged since this run started - aborting',\n );\n throw new Error(REPOSITORY_CHANGED);\n }\n if (branchIsModified || userChangedTargetBranch(branchPr)) {\n logger.debug(`PR has been edited, PrNo:${branchPr.number}`);\n await handleModifiedPr(config, branchPr);\n if (!(!!dependencyDashboardCheck || config.rebaseRequested)) {\n return {\n branchExists,\n prNo: branchPr.number,\n result: 'pr-edited',\n };\n }\n }\n } else if (branchIsModified) {\n const oldPr = await platform.findPr({\n branchName: config.branchName,\n state: '!open',\n targetBranch: config.baseBranch,\n });\n if (!oldPr) {\n logger.debug('Branch has been edited but found no PR - skipping');\n return {\n branchExists,\n result: 'pr-edited',\n };\n }\n const branchSha = await scm.getBranchCommit(config.branchName);\n const oldPrSha = oldPr?.sha;\n if (!oldPrSha || oldPrSha === branchSha) {\n logger.debug(\n { oldPrNumber: oldPr.number, oldPrSha, branchSha },\n 'Found old PR matching this branch - will override it',\n );\n } else {\n logger.debug(\n { oldPrNumber: oldPr.number, oldPrSha, branchSha },\n 'Found old PR but the SHA is different',\n );\n return {\n branchExists,\n result: 'pr-edited',\n };\n }\n }\n }\n\n // Check schedule\n config.isScheduledNow = isScheduledNow(config, 'schedule');\n if (!config.isScheduledNow && !dependencyDashboardCheck) {\n if (!branchExists) {\n logger.debug('Skipping branch creation as not within schedule');\n return {\n branchExists,\n result: 'not-scheduled',\n };\n }\n if (config.updateNotScheduled === false && !config.rebaseRequested) {\n logger.debug('Skipping branch update as not within schedule');\n return {\n branchExists,\n prNo: branchPr?.number,\n result: 'update-not-scheduled',\n };\n }\n if (\n !branchPr &&\n !(config.automerge && config.automergeType === 'branch') // if branch is configured for automerge there's no need for a PR\n ) {\n logger.debug('Skipping PR creation out of schedule');\n return {\n branchExists,\n result: 'not-scheduled',\n };\n }\n logger.debug(\n 'Branch + PR exists but is not scheduled -- will update if necessary',\n );\n }\n //stability checks\n if (\n config.upgrades.some(\n (upgrade) =>\n isNonEmptyString(upgrade.minimumReleaseAge) ||\n isActiveConfidenceLevel(upgrade.minimumConfidence!),\n )\n ) {\n const depNamesWithoutReleaseTimestamp: Record<\n MinimumReleaseAgeBehaviour,\n {\n depName: string;\n updateType: UpdateType;\n }[]\n > = {\n 'timestamp-required': [],\n 'timestamp-optional': [],\n };\n\n // Only set a stability status check if one or more of the updates contain\n // both a minimumReleaseAge setting and a releaseTimestamp\n config.stabilityStatus = 'green';\n // Default to 'success' but set 'pending' if any update is pending\n for (const upgrade of config.upgrades) {\n const minimumReleaseAgeMs = isNonEmptyString(upgrade.minimumReleaseAge)\n ? coerceNumber(toMs(upgrade.minimumReleaseAge), 0)\n : 0;\n\n if (minimumReleaseAgeMs) {\n const minimumReleaseAgeBehaviour: MinimumReleaseAgeBehaviour =\n upgrade.minimumReleaseAgeBehaviour ?? 'timestamp-required';\n\n // regardless of the value of `minimumReleaseAgeBehaviour`, if there is a timestamp, we will process it according to `minimumReleaseAge`\n if (upgrade.releaseTimestamp) {\n const timeElapsed = getElapsedMs(upgrade.releaseTimestamp);\n if (timeElapsed < minimumReleaseAgeMs) {\n logger.debug(\n {\n depName: upgrade.depName,\n timeElapsed,\n minimumReleaseAge: upgrade.minimumReleaseAge,\n },\n 'Update has not passed minimum release age',\n );\n config.stabilityStatus = 'yellow';\n continue;\n }\n } else {\n // if we're set to `minimumReleaseAgeBehaviour=timestamp-required`, and there isn't a timestamp, always mark the update as pending\n if (minimumReleaseAgeBehaviour === 'timestamp-required') {\n depNamesWithoutReleaseTimestamp['timestamp-required'].push({\n depName: upgrade.depName!,\n updateType: upgrade.updateType!,\n });\n config.stabilityStatus = 'yellow';\n continue;\n } else {\n // if there is no timestamp, and we're running in `optional` mode, we can allow it, but make sure to warn the user\n depNamesWithoutReleaseTimestamp['timestamp-optional'].push({\n depName: upgrade.depName!,\n updateType: upgrade.updateType!,\n });\n }\n }\n }\n const datasource = upgrade.datasource!;\n const depName = upgrade.depName!;\n const packageName = upgrade.packageName!;\n const minimumConfidence = upgrade.minimumConfidence!;\n const updateType = upgrade.updateType!;\n const currentVersion = upgrade.currentVersion!;\n const newVersion = upgrade.newVersion!;\n if (isActiveConfidenceLevel(minimumConfidence)) {\n const confidence =\n (await getMergeConfidenceLevel(\n datasource,\n packageName,\n currentVersion,\n newVersion,\n updateType,\n )) ?? 'neutral';\n if (satisfiesConfidenceLevel(confidence, minimumConfidence)) {\n config.confidenceStatus = 'green';\n } else {\n logger.debug(\n { depName, confidence, minimumConfidence },\n 'Update does not meet minimum confidence scores',\n );\n config.confidenceStatus = 'yellow';\n continue;\n }\n }\n }\n\n if (depNamesWithoutReleaseTimestamp['timestamp-required'].length) {\n logger.debug(\n { updates: depNamesWithoutReleaseTimestamp['timestamp-required'] },\n `Marking ${depNamesWithoutReleaseTimestamp['timestamp-required'].length} release(s) as pending, as they do not have a releaseTimestamp and we're running with minimumReleaseAgeBehaviour=timestamp-required`,\n );\n }\n if (depNamesWithoutReleaseTimestamp['timestamp-optional'].length) {\n logger.once.warn(\n \"Some upgrade(s) did not have a releaseTimestamp, but as we're running with minimumReleaseAgeBehaviour=timestamp-optional, proceeding. See debug logs for more information\",\n );\n logger.debug(\n { updates: depNamesWithoutReleaseTimestamp['timestamp-optional'] },\n `${depNamesWithoutReleaseTimestamp['timestamp-optional'].length} upgrade(s) did not have a releaseTimestamp, but as we're running with minimumReleaseAgeBehaviour=timestamp-optional, proceeding`,\n );\n }\n\n // Don't create a branch if we know it will be status 'pending'\n if (\n !dependencyDashboardCheck &&\n !branchExists &&\n config.stabilityStatus === 'yellow' &&\n ['not-pending', 'status-success'].includes(config.prCreation!)\n ) {\n logger.debug(\n 'Skipping branch creation due to internal status checks not met',\n );\n return {\n branchExists,\n result: 'pending',\n };\n }\n }\n\n let userRebaseRequested =\n dependencyDashboardCheck === 'rebase' ||\n !!config.dependencyDashboardRebaseAllOpen ||\n !!config.rebaseRequested;\n const userApproveAllPendingPR = !!config.dependencyDashboardAllPending;\n const userOpenAllRateLimtedPR = !!config.dependencyDashboardAllRateLimited;\n if (forceRebase) {\n logger.debug('Force rebase because branch needs updating');\n config.reuseExistingBranch = false;\n } else if (userRebaseRequested) {\n logger.debug('User has requested rebase');\n config.reuseExistingBranch = false;\n } else if (dependencyDashboardCheck === 'global-config') {\n logger.debug(`Manual create/rebase requested via checkedBranches`);\n config.reuseExistingBranch = false;\n userRebaseRequested = true;\n } else if (userApproveAllPendingPR) {\n logger.debug(\n 'A user manually approved all pending PRs via the Dependency Dashboard.',\n );\n } else if (userOpenAllRateLimtedPR) {\n logger.debug(\n 'A user manually approved all rate-limited PRs via the Dependency Dashboard.',\n );\n } else if (\n branchExists &&\n config.rebaseWhen === 'never' &&\n !(keepUpdatedLabel && branchPr?.labels?.includes(keepUpdatedLabel)) &&\n !dependencyDashboardCheck\n ) {\n logger.debug('rebaseWhen=never so skipping branch update check');\n return {\n branchExists,\n prNo: branchPr?.number,\n result: 'no-work',\n };\n }\n // if the base branch has been changed by user in renovate config, rebase onto the new baseBranch\n // we have already confirmed earlier that branch isn't modified, so its safe to use targetBranch here\n else if (\n branchPr?.targetBranch &&\n branchPr.targetBranch !== config.baseBranch\n ) {\n logger.debug(\n 'Base branch changed by user, rebasing the branch onto new base',\n );\n config.reuseExistingBranch = false;\n } else if (config.cacheFingerprintMatch === 'no-match') {\n logger.debug(\n 'Cache fingerprint does not match, cannot reuse existing branch',\n );\n config.reuseExistingBranch = false;\n } else {\n config = await shouldReuseExistingBranch(config);\n }\n // TODO: types (#22198)\n logger.debug(`Using reuseExistingBranch: ${config.reuseExistingBranch!}`);\n if (\n !(\n config.reuseExistingBranch && config.cacheFingerprintMatch === 'matched'\n )\n ) {\n await scm.checkoutBranch(config.baseBranch);\n const res = await getUpdatedPackageFiles(config);\n if (res.artifactErrors && config.artifactErrors) {\n res.artifactErrors = config.artifactErrors.concat(res.artifactErrors);\n }\n config = { ...config, ...res };\n if (config.updatedPackageFiles?.length) {\n logger.debug(\n `Updated ${config.updatedPackageFiles.length} package files`,\n );\n if (config.reuseExistingBranch && !forceRebase) {\n logger.debug(\n 'Existing branch needs updating. Restarting processBranch() with a clean branch',\n );\n return processBranch(branchConfig, true);\n }\n } else {\n logger.debug('No package files need updating');\n }\n const additionalFiles = await getAdditionalFiles(\n config,\n branchConfig.packageFiles!,\n );\n config.artifactErrors = (config.artifactErrors ?? []).concat(\n additionalFiles.artifactErrors,\n );\n config.updatedArtifacts = (config.updatedArtifacts ?? []).concat(\n additionalFiles.updatedArtifacts,\n );\n if (config.updatedArtifacts?.length) {\n logger.debug(\n {\n updatedArtifacts: config.updatedArtifacts.map((f) =>\n f.type === 'deletion' ? `${f.path} (delete)` : f.path,\n ),\n },\n `Updated ${config.updatedArtifacts.length} lock files`,\n );\n if (config.reuseExistingBranch && !forceRebase) {\n logger.debug(\n 'Existing branch needs updating. Restarting processBranch() with a clean branch',\n );\n return processBranch(branchConfig, true);\n }\n } else {\n logger.debug('No updated lock files in branch');\n }\n if (config.fetchChangeLogs === 'branch') {\n await embedChangelogs(config.upgrades);\n }\n\n const postUpgradeCommandResults =\n await executePostUpgradeCommands(config);\n\n if (postUpgradeCommandResults !== null) {\n const { updatedArtifacts, artifactErrors } = postUpgradeCommandResults;\n config.updatedArtifacts = updatedArtifacts;\n config.artifactErrors = artifactErrors;\n }\n\n // modifies the file changes in place to allow having a version bump in a packageFile or artifact\n await bumpVersions(config);\n\n removeMeta(['dep']);\n\n if (config.artifactErrors?.length) {\n if (config.releaseTimestamp) {\n logger.debug(`Branch timestamp: ` + config.releaseTimestamp);\n const releaseTimestamp = DateTime.fromISO(config.releaseTimestamp);\n if (releaseTimestamp.plus({ hours: 2 }) < DateTime.local()) {\n logger.debug(\n 'PR is older than 2 hours, raise PR with lock file errors',\n );\n } else if (branchExists) {\n logger.debug(\n 'PR is less than 2 hours old but branchExists so updating anyway',\n );\n } else {\n logger.debug(\n 'PR is less than 2 hours old - raise error instead of PR',\n );\n throw new Error(MANAGER_LOCKFILE_ERROR);\n }\n } else {\n logger.debug('PR has no releaseTimestamp');\n }\n } else if (config.updatedArtifacts?.length && branchPr) {\n // If there are artifacts, no errors, and an existing PR then ensure any artifacts error comment is removed\n if (GlobalConfig.get('dryRun')) {\n logger.info(\n `DRY-RUN: Would ensure comment removal in PR #${branchPr.number}`,\n );\n } else {\n // Remove artifacts error comment only if this run has successfully updated artifacts\n await ensureCommentRemoval({\n type: 'by-topic',\n number: branchPr.number,\n topic: artifactErrorTopic,\n });\n\n if (!config.artifactNotices?.length) {\n await ensureCommentRemoval({\n type: 'by-topic',\n number: branchPr.number,\n topic: artifactNoticeTopic,\n });\n }\n }\n }\n const forcedManually = userRebaseRequested || !branchExists;\n\n config.isConflicted ??=\n branchExists &&\n (await scm.isBranchConflicted(config.baseBranch, config.branchName));\n config.forceCommit = forcedManually || config.isConflicted;\n\n // compile commit message with body, which maybe needs changelogs\n if (config.commitBody) {\n // changelog is on first upgrade\n config.commitMessage = `${config.commitMessage!}\\n\\n${template.compile(\n config.commitBody,\n {\n ...config,\n logJSON: config.upgrades[0].logJSON,\n releases: config.upgrades[0].releases,\n },\n )}`;\n\n logger.trace(`commitMessage: ` + JSON.stringify(config.commitMessage));\n }\n\n commitSha = await commitFilesToBranch(config);\n // Checkout to base branch to ensure that the next branch processing always starts with git being on the baseBranch\n // baseBranch is not checked out at the start of processBranch() due to pull/16246\n await scm.checkoutBranch(config.baseBranch);\n updatesVerified = true;\n }\n\n if (branchPr) {\n const platformPrOptions = getPlatformPrOptions(config);\n if (\n platformPrOptions.usePlatformAutomerge &&\n platform.reattemptPlatformAutomerge\n ) {\n if (GlobalConfig.get('dryRun')) {\n logger.info(\n `DRY-RUN: Would reattempt platform automerge for PR #${branchPr.number}`,\n );\n } else {\n await platform.reattemptPlatformAutomerge({\n number: branchPr.number,\n platformPrOptions,\n });\n }\n }\n if (platform.refreshPr) {\n await platform.refreshPr(branchPr.number);\n }\n }\n if (!commitSha && !branchExists) {\n return {\n branchExists,\n result: 'no-work',\n };\n }\n if (commitSha) {\n const action = branchExists ? 'updated' : 'created';\n logger.info({ commitSha }, `Branch ${action}`);\n }\n // Set branch statuses\n await setArtifactErrorStatus(config);\n await setStability(config);\n await setConfidence(config);\n\n // new commit means status check are pretty sure pending but maybe not reported yet\n // if PR has not been created + new commit + prCreation !== immediate skip\n // but do not break when there are artifact errors\n if (\n !branchPr &&\n !config.artifactErrors?.length &&\n !userRebaseRequested &&\n commitSha &&\n config.prCreation !== 'immediate'\n ) {\n logger.debug(`Branch status pending, current sha: ${commitSha}`);\n return {\n branchExists: true,\n updatesVerified,\n result: 'pending',\n commitSha,\n };\n }\n\n // Try to automerge branch and finish if successful, but only if branch already existed before this run\n // skip if we have a non-immediate pr and there is an existing PR,\n // we want to update the PR and skip the Auto merge since status checks aren't done yet\n if (!config.artifactErrors?.length && (!commitSha || config.ignoreTests)) {\n const mergeStatus = await tryBranchAutomerge(config);\n logger.debug(`mergeStatus=${mergeStatus}`);\n if (mergeStatus === 'automerged') {\n if (GlobalConfig.get('dryRun')) {\n logger.info('DRY-RUN: Would delete branch' + config.branchName);\n } else {\n await deleteBranchSilently(config.branchName);\n }\n logger.debug('Branch is automerged - returning');\n return { branchExists: false, result: 'automerged' };\n }\n if (mergeStatus === 'off schedule') {\n if (userRebaseRequested) {\n config.forcePr = true;\n } else {\n logger.debug(\n 'Branch cannot automerge now because automergeSchedule is off schedule - skipping',\n );\n return {\n branchExists,\n result: 'not-scheduled',\n commitSha,\n };\n }\n }\n if (\n mergeStatus === 'stale' &&\n ['conflicted', 'never'].includes(config.rebaseWhen!) &&\n /* v8 ignore next -- needs test */\n !(keepUpdatedLabel && branchPr?.labels?.includes(keepUpdatedLabel))\n ) {\n logger.warn(\n 'Branch cannot automerge because it is behind base branch and rebaseWhen setting disallows rebasing - raising a PR instead',\n );\n config.forcePr = true;\n config.branchAutomergeFailureMessage = mergeStatus;\n }\n if (\n mergeStatus === 'automerge aborted - PR exists' ||\n mergeStatus === 'branch status error' ||\n mergeStatus === 'failed'\n ) {\n logger.debug(\n `Branch automerge not possible, mergeStatus:${mergeStatus}`,\n );\n config.forcePr = true;\n config.branchAutomergeFailureMessage = mergeStatus;\n }\n }\n } catch (err) {\n /* v8 ignore if -- needs test */\n if (err.statusCode === 404) {\n logger.debug({ err }, 'Received a 404 error - aborting run');\n throw new Error(REPOSITORY_CHANGED);\n }\n /* v8 ignore if -- needs test */\n if (err.message === PLATFORM_RATE_LIMIT_EXCEEDED) {\n logger.debug('Passing rate-limit-exceeded error up');\n throw err;\n }\n if (err.message === REPOSITORY_CHANGED) {\n logger.debug('Passing repository-changed error up');\n throw err;\n }\n /* v8 ignore if -- needs test */\n if (err.message?.startsWith('remote: Invalid username or password')) {\n logger.debug('Throwing bad credentials');\n throw new Error(PLATFORM_BAD_CREDENTIALS);\n }\n /* v8 ignore if -- needs test */\n if (\n err.message?.startsWith(\n 'ssh_exchange_identification: Connection closed by remote host',\n )\n ) {\n logger.debug('Throwing bad credentials');\n throw new Error(PLATFORM_BAD_CREDENTIALS);\n }\n /* v8 ignore if -- needs test */\n if (err.message === PLATFORM_BAD_CREDENTIALS) {\n logger.debug('Passing bad-credentials error up');\n throw err;\n }\n /* v8 ignore if -- needs test */\n if (err.message === PLATFORM_INTEGRATION_UNAUTHORIZED) {\n logger.debug('Passing integration-unauthorized error up');\n throw err;\n }\n if (err.message === MANAGER_LOCKFILE_ERROR) {\n logger.debug('Passing lockfile-error up');\n throw err;\n }\n /* v8 ignore if -- needs test */\n if (err.message?.includes('space left on device')) {\n throw new Error(SYSTEM_INSUFFICIENT_DISK_SPACE);\n }\n /* v8 ignore if -- needs test */\n if (err.message === SYSTEM_INSUFFICIENT_DISK_SPACE) {\n logger.debug('Passing disk-space error up');\n throw err;\n }\n /* v8 ignore if -- needs test */\n if (err.message.startsWith('Resource not accessible by integration')) {\n logger.debug('Passing 403 error up');\n throw err;\n }\n /* v8 ignore next -- needs test */\n if (err.message === WORKER_FILE_UPDATE_FAILED) {\n logger.warn('Error updating branch: update failure');\n } else if (err.message.startsWith('bundler-')) {\n // we have already warned inside the bundler artifacts error handling, so just return\n return {\n branchExists: true,\n updatesVerified,\n prNo: branchPr?.number,\n result: 'error',\n commitSha,\n };\n } else if (\n err.messagee &&\n err.message.includes('fatal: Authentication failed')\n ) {\n throw new Error(PLATFORM_AUTHENTICATION_ERROR);\n } else if (err.message?.includes('fatal: bad revision')) {\n logger.debug({ err }, 'Aborting job due to bad revision error');\n throw new Error(REPOSITORY_CHANGED);\n } else if (err.message === CONFIG_VALIDATION) {\n logger.debug('Passing config validation error up');\n throw err;\n } else if (err.message === TEMPORARY_ERROR) {\n logger.debug('Passing TEMPORARY_ERROR error up');\n throw err;\n } else if (!(err instanceof ExternalHostError)) {\n logger.warn({ err }, `Error updating branch`);\n }\n // Don't throw here - we don't want to stop the other renovations\n return {\n branchExists,\n prNo: branchPr?.number,\n result: 'error',\n commitSha,\n };\n }\n try {\n logger.debug('Ensuring PR');\n logger.debug(\n `There are ${config.errors!.length} errors and ${\n config.warnings!.length\n } warnings`,\n );\n const ensurePrResult = await ensurePr(config);\n if (ensurePrResult.type === 'without-pr') {\n const { prBlockedBy } = ensurePrResult;\n branchPr = null;\n if (prBlockedBy === 'RateLimited' && !config.isVulnerabilityAlert) {\n logger.debug('Reached PR limit - skipping PR creation');\n return {\n branchExists,\n prBlockedBy,\n result: 'pr-limit-reached',\n commitSha,\n };\n }\n // TODO: ensurePr should check for automerge itself (#9719)\n if (prBlockedBy === 'NeedsApproval') {\n return {\n branchExists,\n prBlockedBy,\n result: 'needs-pr-approval',\n commitSha,\n };\n }\n if (prBlockedBy === 'AwaitingTests') {\n return {\n branchExists,\n prBlockedBy,\n result: 'pending',\n commitSha,\n };\n }\n if (prBlockedBy === 'BranchAutomerge') {\n return {\n branchExists,\n prBlockedBy,\n result: 'done',\n commitSha,\n };\n }\n if (prBlockedBy === 'Error') {\n return {\n branchExists,\n prBlockedBy,\n result: 'error',\n commitSha,\n };\n }\n logger.warn({ prBlockedBy }, 'Unknown PrBlockedBy result');\n return {\n branchExists,\n prBlockedBy,\n result: 'error',\n commitSha,\n };\n }\n if (ensurePrResult.type === 'with-pr') {\n const { pr } = ensurePrResult;\n branchPr = pr;\n if (config.artifactErrors?.length) {\n logger.warn(\n { artifactErrors: config.artifactErrors },\n 'artifactErrors',\n );\n let content = `Renovate failed to update `;\n content +=\n config.artifactErrors.length > 1 ? 'artifacts' : 'an artifact';\n content += ' related to this branch. ';\n content += template.compile(\n config.userStrings!.artifactErrorWarning,\n config,\n );\n content += emojify(\n `\\n\\n:recycle: Renovate will retry this branch, including artifacts, only when one of the following happens:\\n\\n`,\n );\n content +=\n ' - any of the package files in this branch needs updating, or \\n';\n content += ' - the branch becomes conflicted, or\\n';\n content +=\n ' - you click the rebase/retry checkbox if found above, or\\n';\n content +=\n ' - you rename this PR\\'s title to start with \"rebase!\" to trigger it manually';\n content += '\\n\\nThe artifact failure details are included below:\\n\\n';\n // TODO: types (#22198)\n config.artifactErrors.forEach((error) => {\n content += `##### File name: ${error.lockFile!}\\n\\n`;\n content += `\\`\\`\\`\\n${error.stderr!}\\n\\`\\`\\`\\n\\n`;\n });\n content = platform.massageMarkdown(content, config.rebaseLabel);\n if (\n !(\n config.suppressNotifications!.includes('artifactErrors') ||\n config.suppressNotifications!.includes('lockFileErrors')\n )\n ) {\n if (GlobalConfig.get('dryRun')) {\n logger.info(\n `DRY-RUN: Would ensure lock file error comment in PR #${pr.number}`,\n );\n } else {\n await ensureComment({\n number: pr.number,\n topic: artifactErrorTopic,\n content,\n });\n }\n }\n } else {\n if (config.artifactNotices?.length) {\n const contentLines: string[] = [];\n for (const notice of config.artifactNotices) {\n contentLines.push(`##### File name: ${notice.file}`);\n contentLines.push(notice.message);\n }\n const content = contentLines.join('\\n\\n');\n await ensureComment({\n number: pr.number,\n topic: artifactNoticeTopic,\n content,\n });\n }\n\n if (config.automerge) {\n logger.debug('PR is configured for automerge');\n // skip automerge if there is a new commit since status checks aren't done yet\n if (config.ignoreTests === true || !commitSha) {\n logger.debug('checking auto-merge');\n const prAutomergeResult = await checkAutoMerge(pr, config);\n if (prAutomergeResult?.automerged) {\n return {\n branchExists,\n result: 'automerged',\n commitSha,\n };\n }\n }\n } else {\n logger.debug('PR is not configured for automerge');\n }\n }\n }\n } catch (err) {\n /* v8 ignore if -- needs test */\n if (\n err instanceof ExternalHostError ||\n [PLATFORM_RATE_LIMIT_EXCEEDED, REPOSITORY_CHANGED].includes(err.message)\n ) {\n logger.debug('Passing PR error up');\n throw err;\n }\n // Otherwise don't throw here - we don't want to stop the other renovations\n logger.error({ err }, `Error ensuring PR`);\n }\n if (!branchExists) {\n return {\n branchExists: true,\n updatesVerified,\n prNo: branchPr?.number,\n result: 'pr-created',\n commitSha,\n };\n }\n return {\n branchExists,\n updatesVerified,\n prNo: branchPr?.number,\n result: 'done',\n commitSha,\n };\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "renovate",
|
|
3
3
|
"description": "Automated dependency updates. Flexible so you don't need to be.",
|
|
4
|
-
"version": "42.
|
|
4
|
+
"version": "42.20.0",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"bin": {
|
|
7
7
|
"renovate": "dist/renovate.js",
|
|
@@ -218,6 +218,7 @@
|
|
|
218
218
|
},
|
|
219
219
|
"devDependencies": {
|
|
220
220
|
"@containerbase/eslint-plugin": "1.1.19",
|
|
221
|
+
"@containerbase/istanbul-reports-html": "1.1.13",
|
|
221
222
|
"@containerbase/semantic-release-pnpm": "1.3.5",
|
|
222
223
|
"@eslint/js": "9.39.1",
|
|
223
224
|
"@hyrious/marshal": "0.3.3",
|
|
@@ -297,7 +298,7 @@
|
|
|
297
298
|
"typescript": "5.9.3",
|
|
298
299
|
"typescript-eslint": "8.47.0",
|
|
299
300
|
"unified": "11.0.5",
|
|
300
|
-
"vite": "7.2.
|
|
301
|
+
"vite": "npm:rolldown-vite@7.2.7",
|
|
301
302
|
"vite-tsconfig-paths": "5.1.4",
|
|
302
303
|
"vitest": "4.0.10",
|
|
303
304
|
"vitest-mock-extended": "3.1.0"
|
package/renovate-schema.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"title": "JSON schema for Renovate 42.
|
|
2
|
+
"title": "JSON schema for Renovate 42.20.0 config files (https://renovatebot.com/)",
|
|
3
3
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
4
|
-
"x-renovate-version": "42.
|
|
4
|
+
"x-renovate-version": "42.20.0",
|
|
5
5
|
"allowComments": true,
|
|
6
6
|
"type": "object",
|
|
7
7
|
"properties": {
|
|
@@ -2715,7 +2715,7 @@
|
|
|
2715
2715
|
"dockerSidecarImage": {
|
|
2716
2716
|
"description": "Deprecated: This configuration option is only intended to be used with 'global' configuration when self-hosting, not used in a repository configuration file. Renovate likely won't use the configuration, and these fields will be removed from the repository configuration documentation in Renovate v43 (https://github.com/renovatebot/renovate/issues/38728)\n\nChange this value to override the default Renovate sidecar image.",
|
|
2717
2717
|
"type": "string",
|
|
2718
|
-
"default": "ghcr.io/containerbase/sidecar:13.25.
|
|
2718
|
+
"default": "ghcr.io/containerbase/sidecar:13.25.3"
|
|
2719
2719
|
},
|
|
2720
2720
|
"dockerUser": {
|
|
2721
2721
|
"description": "Deprecated: This configuration option is only intended to be used with 'global' configuration when self-hosting, not used in a repository configuration file. Renovate likely won't use the configuration, and these fields will be removed from the repository configuration documentation in Renovate v43 (https://github.com/renovatebot/renovate/issues/38728)\n\nSet the `UID` and `GID` for Docker-based binaries if you use `binarySource=docker`.",
|