renovate 44.72.0 → 44.74.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/presets/internal/custom-managers.preset.js +9 -0
- package/dist/config/presets/internal/custom-managers.preset.js.map +1 -1
- package/dist/modules/platform/github/graphql.js +17 -1
- package/dist/modules/platform/github/graphql.js.map +1 -1
- package/dist/modules/platform/github/index.js +41 -6
- package/dist/modules/platform/github/index.js.map +1 -1
- package/dist/modules/platform/gitlab/index.d.ts +13 -1
- package/dist/modules/platform/gitlab/index.js +39 -3
- package/dist/modules/platform/gitlab/index.js.map +1 -1
- package/dist/modules/platform/gitlab/schema.js +11 -1
- package/dist/modules/platform/gitlab/schema.js.map +1 -1
- package/dist/modules/platform/types.d.ts +15 -0
- package/dist/workers/repository/update/branch/automerge.js +7 -0
- package/dist/workers/repository/update/branch/automerge.js.map +1 -1
- package/dist/workers/repository/update/branch/index.js +1 -1
- package/dist/workers/repository/update/branch/index.js.map +1 -1
- package/dist/workers/repository/update/branch/reuse.js +5 -2
- package/dist/workers/repository/update/branch/reuse.js.map +1 -1
- package/dist/workers/repository/update/pr/automerge.js +18 -0
- package/dist/workers/repository/update/pr/automerge.js.map +1 -1
- package/dist/workers/repository/update/pr/index.js +1 -0
- package/dist/workers/repository/update/pr/index.js.map +1 -1
- package/package.json +2 -2
- package/renovate-schema.json +2 -2
|
@@ -113,6 +113,15 @@ const presets = {
|
|
|
113
113
|
matchStrings: ["\"(?<depName>@tsconfig/node(?<major>\\d+))\""]
|
|
114
114
|
}],
|
|
115
115
|
description: "Update `@tsconfig/node` extends in `tsconfig.json` and `jsconfig.json` files."
|
|
116
|
+
},
|
|
117
|
+
valeVersions: {
|
|
118
|
+
customManagers: [{
|
|
119
|
+
customType: "regex",
|
|
120
|
+
datasourceTemplate: "github-releases",
|
|
121
|
+
managerFilePatterns: ["/(^|/)\\.vale\\.ini$/"],
|
|
122
|
+
matchStrings: ["https://github\\.com/(?<packageName>[^/]+/[^/]+)/releases/download/(?<currentValue>[^/]+)/"]
|
|
123
|
+
}],
|
|
124
|
+
description: "Update Vale package versions in `.vale.ini` configuration files."
|
|
116
125
|
}
|
|
117
126
|
};
|
|
118
127
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"custom-managers.preset.js","names":[],"sources":["../../../../lib/config/presets/internal/custom-managers.preset.ts"],"sourcesContent":["import type { Preset } from '../types.ts';\n\nexport const presets: Record<string, Preset> = {\n azurePipelinesVersions: {\n customManagers: [\n {\n customType: 'regex',\n managerFilePatterns: [\n '**/.azuredevops/**/*.{yml,yaml}',\n 'azure*pipeline*.{yml,yaml}',\n ],\n matchStrings: [\n '# renovate: datasource=(?<datasource>[a-zA-Z0-9-._]+?) depName=(?<depName>[^\\\\s]+?)(?: (?:lookupName|packageName)=(?<packageName>[^\\\\s]+?))?(?: versioning=(?<versioning>[^\\\\s]+?))?(?: extractVersion=(?<extractVersion>[^\\\\s]+?))?(?: registryUrl=(?<registryUrl>[^\\\\s]+?))?\\\\s+[A-Za-z0-9_]+?_VERSION\\\\s*:\\\\s*[\"\\']?(?<currentValue>.+?)[\"\\']?\\\\s',\n ],\n },\n ],\n description:\n 'Update `_VERSION` environment variables in Azure Pipelines files.',\n },\n biomeVersions: {\n customManagers: [\n {\n customType: 'jsonata',\n datasourceTemplate: 'npm',\n depNameTemplate: '@biomejs/biome',\n fileFormat: 'json',\n managerFilePatterns: ['**/biome.{json,jsonc}'],\n matchStrings: ['{\"currentValue\": $split($.\"$schema\",(\"/\"))[-2]}'],\n },\n ],\n description:\n 'Update `$schema` version in `biome.json` configuration files.',\n },\n bitbucketPipelinesVersions: {\n customManagers: [\n {\n customType: 'regex',\n managerFilePatterns: ['**/*-pipelines.yml'],\n matchStrings: [\n '# renovate: datasource=(?<datasource>[a-zA-Z0-9-._]+?) depName=(?<depName>[^\\\\s]+?)(?: (lookupName|packageName)=(?<packageName>[^\\\\s]+?))?(?: versioning=(?<versioning>[^\\\\s]+?))?(?: extractVersion=(?<extractVersion>[^\\\\s]+?))?(?: registryUrl=(?<registryUrl>[^\\\\s]+?))?\\\\s+.*\\\\s+[A-Za-z0-9_]+?_VERSION[ =:]\\\\s?[\"\\']?(?<currentValue>.+?)[\"\\']?\\\\s',\n ],\n },\n ],\n description: 'Update `_VERSION` variables in Bitbucket Pipelines',\n },\n dockerfileVersions: {\n customManagers: [\n {\n customType: 'regex',\n managerFilePatterns: [\n '**/[Dd]ockerfile*',\n '**/[Cc]ontainerfile*',\n '**/*.[Dd]ockerfile*',\n '**/*.[Cc]ontainerfile*',\n ],\n matchStrings: [\n '# renovate: datasource=(?<datasource>[a-zA-Z0-9-._]+?) depName=(?<depName>[^\\\\s]+?)(?: (lookupName|packageName)=(?<packageName>[^\\\\s]+?))?(?: versioning=(?<versioning>[^\\\\s]+?))?(?: extractVersion=(?<extractVersion>[^\\\\s]+?))?(?: registryUrl=(?<registryUrl>[^\\\\s]+?))?\\\\s(?:ENV|ARG)\\\\s+[A-Za-z0-9_]+?_VERSION[ =][\"\\']?(?<currentValue>.+?)[\"\\']?\\\\s',\n ],\n },\n ],\n description: 'Update `_VERSION` variables in Dockerfiles.',\n },\n githubActionsVersions: {\n customManagers: [\n {\n customType: 'regex',\n managerFilePatterns: [\n '/(^|/)(workflow-templates|\\\\.(?:github|gitea|forgejo)/(?:workflows|actions))/.+\\\\.ya?ml$/',\n '/(^|/)action\\\\.ya?ml$/',\n ],\n matchStrings: [\n '# renovate: datasource=(?<datasource>[a-zA-Z0-9-._]+?) depName=(?<depName>[^\\\\s]+?)(?: (?:lookupName|packageName)=(?<packageName>[^\\\\s]+?))?(?: versioning=(?<versioning>[^\\\\s]+?))?(?: extractVersion=(?<extractVersion>[^\\\\s]+?))?(?: registryUrl=(?<registryUrl>[^\\\\s]+?))?\\\\s+[A-Za-z0-9_]+?_VERSION\\\\s*:\\\\s*[\"\\']?(?<currentValue>.+?)[\"\\']?\\\\s',\n ],\n },\n ],\n description:\n 'Update `_VERSION` environment variables in GitHub Action files.',\n },\n gitlabPipelineVersions: {\n customManagers: [\n {\n customType: 'regex',\n managerFilePatterns: ['**/*.gitlab-ci.{yml,yaml}'],\n matchStrings: [\n '# renovate: datasource=(?<datasource>[a-zA-Z0-9-._]+?) depName=(?<depName>[^\\\\s]+?)(?: (?:packageName)=(?<packageName>[^\\\\s]+?))?(?: versioning=(?<versioning>[^\\\\s]+?))?(?: extractVersion=(?<extractVersion>[^\\\\s]+?))?(?: registryUrl=(?<registryUrl>[^\\\\s]+?))?\\\\s+[A-Za-z0-9_]+?_VERSION\\\\s*:\\\\s*[\"\\']?(?<currentValue>.+?)[\"\\']?\\\\s',\n ],\n },\n ],\n description:\n 'Update `_VERSION` environment variables in GitLab pipeline file.',\n },\n helmChartYamlAppVersions: {\n customManagers: [\n {\n customType: 'regex',\n datasourceTemplate: 'docker',\n managerFilePatterns: ['**/Chart.yaml'],\n matchStrings: [\n '#\\\\s*renovate: image=(?<depName>.*?)\\\\s+appVersion:\\\\s*[\"\\']?(?<currentValue>[\\\\w+\\\\.\\\\-]*)',\n ],\n },\n ],\n description: 'Update `appVersion` value in Helm chart `Chart.yaml`.',\n },\n makefileVersions: {\n customManagers: [\n {\n customType: 'regex',\n managerFilePatterns: ['**/[Mm]akefile', '**/GNUMakefile', '**/*.mk'],\n matchStrings: [\n '# renovate: datasource=(?<datasource>[a-zA-Z0-9-._]+?) depName=(?<depName>[^\\\\s]+?)(?: (?:packageName)=(?<packageName>[^\\\\s]+?))?(?: versioning=(?<versioning>[^\\\\s]+?))?(?: extractVersion=(?<extractVersion>[^\\\\s]+?))?(?: registryUrl=(?<registryUrl>[^\\\\s]+?))?\\\\s+[A-Za-z0-9_]+?_VERSION\\\\s*:*\\\\??=\\\\s*[\"\\']?(?<currentValue>.+?)[\"\\']?\\\\s',\n ],\n },\n ],\n description: 'Update `_VERSION` variables in Makefiles.',\n },\n mavenPropertyVersions: {\n customManagers: [\n {\n customType: 'regex',\n datasourceTemplate:\n '{{#if datasource}}{{{datasource}}}{{else}}maven{{/if}}',\n managerFilePatterns: ['**/pom.xml'],\n matchStrings: [\n '<!--\\\\s?renovate:( datasource=(?<datasource>[a-zA-Z0-9-._]+?))? depName=(?<depName>[^\\\\s]+?)(?: packageName=(?<packageName>[^\\\\s]+?))?(?: versioning=(?<versioning>[^\\\\s]+?))?(?: extractVersion=(?<extractVersion>[^\\\\s]+?))?\\\\s+-->\\\\s+<.+\\\\.version>(?<currentValue>.+)<\\\\/.+\\\\.version>',\n ],\n versioningTemplate: '{{#if versioning}}{{{versioning}}}{{/if}}',\n },\n ],\n description: 'Update `*.version` properties in `pom.xml` files.',\n },\n tfvarsVersions: {\n customManagers: [\n {\n customType: 'regex',\n managerFilePatterns: ['**/*.tfvars'],\n matchStrings: [\n '#\\\\s*renovate: datasource=(?<datasource>.*?) depName=(?<depName>.*?)( versioning=(?<versioning>.*?))?(?: extractVersion=(?<extractVersion>.*?))?(?: registryUrl=(?<registryUrl>[^\\\\s]+?))?\\\\s.*?_version\\\\s*=\\\\s*\"(?<currentValue>.*)\"',\n ],\n versioningTemplate: '{{#if versioning}}{{{versioning}}}{{/if}}',\n },\n ],\n description: 'Update `*_version` variables in `.tfvars` files.',\n },\n tsconfigNodeVersions: {\n customManagers: [\n {\n autoReplaceStringTemplate: '\"@tsconfig/node{{{major}}}/tsconfig.json\"',\n currentValueTemplate: '{{{major}}}',\n customType: 'regex',\n datasourceTemplate: 'npm',\n managerFilePatterns: ['**/{j,t}sconfig.json', '**/{j,t}sconfig.*.json'],\n matchStrings: [\n '\"(?<depName>@tsconfig/node(?<major>\\\\d+))/tsconfig\\\\.json\"',\n ],\n },\n {\n autoReplaceStringTemplate: '\"@tsconfig/node{{{major}}}\"',\n currentValueTemplate: '{{{major}}}',\n customType: 'regex',\n datasourceTemplate: 'npm',\n managerFilePatterns: ['**/{j,t}sconfig.json', '**/{j,t}sconfig.*.json'],\n matchStrings: ['\"(?<depName>@tsconfig/node(?<major>\\\\d+))\"'],\n },\n ],\n description:\n 'Update `@tsconfig/node` extends in `tsconfig.json` and `jsconfig.json` files.',\n },\n};\n"],"mappings":";AAEA,MAAa,UAAkC;CAC7C,wBAAwB;EACtB,gBAAgB,CACd;GACE,YAAY;GACZ,qBAAqB,CACnB,mCACA,4BACF;GACA,cAAc,CACZ,sVACF;EACF,CACF;EACA,aACE;CACJ;CACA,eAAe;EACb,gBAAgB,CACd;GACE,YAAY;GACZ,oBAAoB;GACpB,iBAAiB;GACjB,YAAY;GACZ,qBAAqB,CAAC,uBAAuB;GAC7C,cAAc,CAAC,uDAAiD;EAClE,CACF;EACA,aACE;CACJ;CACA,4BAA4B;EAC1B,gBAAgB,CACd;GACE,YAAY;GACZ,qBAAqB,CAAC,oBAAoB;GAC1C,cAAc,CACZ,0VACF;EACF,CACF;EACA,aAAa;CACf;CACA,oBAAoB;EAClB,gBAAgB,CACd;GACE,YAAY;GACZ,qBAAqB;IACnB;IACA;IACA;IACA;GACF;GACA,cAAc,CACZ,6VACF;EACF,CACF;EACA,aAAa;CACf;CACA,uBAAuB;EACrB,gBAAgB,CACd;GACE,YAAY;GACZ,qBAAqB,CACnB,6FACA,wBACF;GACA,cAAc,CACZ,sVACF;EACF,CACF;EACA,aACE;CACJ;CACA,wBAAwB;EACtB,gBAAgB,CACd;GACE,YAAY;GACZ,qBAAqB,CAAC,2BAA2B;GACjD,cAAc,CACZ,2UACF;EACF,CACF;EACA,aACE;CACJ;CACA,0BAA0B;EACxB,gBAAgB,CACd;GACE,YAAY;GACZ,oBAAoB;GACpB,qBAAqB,CAAC,eAAe;GACrC,cAAc,CACZ,6FACF;EACF,CACF;EACA,aAAa;CACf;CACA,kBAAkB;EAChB,gBAAgB,CACd;GACE,YAAY;GACZ,qBAAqB;IAAC;IAAkB;IAAkB;GAAS;GACnE,cAAc,CACZ,iVACF;EACF,CACF;EACA,aAAa;CACf;CACA,uBAAuB;EACrB,gBAAgB,CACd;GACE,YAAY;GACZ,oBACE;GACF,qBAAqB,CAAC,YAAY;GAClC,cAAc,CACZ,6RACF;GACA,oBAAoB;EACtB,CACF;EACA,aAAa;CACf;CACA,gBAAgB;EACd,gBAAgB,CACd;GACE,YAAY;GACZ,qBAAqB,CAAC,aAAa;GACnC,cAAc,CACZ,0OACF;GACA,oBAAoB;EACtB,CACF;EACA,aAAa;CACf;CACA,sBAAsB;EACpB,gBAAgB,CACd;GACE,2BAA2B;GAC3B,sBAAsB;GACtB,YAAY;GACZ,oBAAoB;GACpB,qBAAqB,CAAC,wBAAwB,wBAAwB;GACtE,cAAc,CACZ,8DACF;EACF,GACA;GACE,2BAA2B;GAC3B,sBAAsB;GACtB,YAAY;GACZ,oBAAoB;GACpB,qBAAqB,CAAC,wBAAwB,wBAAwB;GACtE,cAAc,CAAC,8CAA4C;EAC7D,CACF;EACA,aACE;CACJ;AACF"}
|
|
1
|
+
{"version":3,"file":"custom-managers.preset.js","names":[],"sources":["../../../../lib/config/presets/internal/custom-managers.preset.ts"],"sourcesContent":["import type { Preset } from '../types.ts';\n\nexport const presets: Record<string, Preset> = {\n azurePipelinesVersions: {\n customManagers: [\n {\n customType: 'regex',\n managerFilePatterns: [\n '**/.azuredevops/**/*.{yml,yaml}',\n 'azure*pipeline*.{yml,yaml}',\n ],\n matchStrings: [\n '# renovate: datasource=(?<datasource>[a-zA-Z0-9-._]+?) depName=(?<depName>[^\\\\s]+?)(?: (?:lookupName|packageName)=(?<packageName>[^\\\\s]+?))?(?: versioning=(?<versioning>[^\\\\s]+?))?(?: extractVersion=(?<extractVersion>[^\\\\s]+?))?(?: registryUrl=(?<registryUrl>[^\\\\s]+?))?\\\\s+[A-Za-z0-9_]+?_VERSION\\\\s*:\\\\s*[\"\\']?(?<currentValue>.+?)[\"\\']?\\\\s',\n ],\n },\n ],\n description:\n 'Update `_VERSION` environment variables in Azure Pipelines files.',\n },\n biomeVersions: {\n customManagers: [\n {\n customType: 'jsonata',\n datasourceTemplate: 'npm',\n depNameTemplate: '@biomejs/biome',\n fileFormat: 'json',\n managerFilePatterns: ['**/biome.{json,jsonc}'],\n matchStrings: ['{\"currentValue\": $split($.\"$schema\",(\"/\"))[-2]}'],\n },\n ],\n description:\n 'Update `$schema` version in `biome.json` configuration files.',\n },\n bitbucketPipelinesVersions: {\n customManagers: [\n {\n customType: 'regex',\n managerFilePatterns: ['**/*-pipelines.yml'],\n matchStrings: [\n '# renovate: datasource=(?<datasource>[a-zA-Z0-9-._]+?) depName=(?<depName>[^\\\\s]+?)(?: (lookupName|packageName)=(?<packageName>[^\\\\s]+?))?(?: versioning=(?<versioning>[^\\\\s]+?))?(?: extractVersion=(?<extractVersion>[^\\\\s]+?))?(?: registryUrl=(?<registryUrl>[^\\\\s]+?))?\\\\s+.*\\\\s+[A-Za-z0-9_]+?_VERSION[ =:]\\\\s?[\"\\']?(?<currentValue>.+?)[\"\\']?\\\\s',\n ],\n },\n ],\n description: 'Update `_VERSION` variables in Bitbucket Pipelines',\n },\n dockerfileVersions: {\n customManagers: [\n {\n customType: 'regex',\n managerFilePatterns: [\n '**/[Dd]ockerfile*',\n '**/[Cc]ontainerfile*',\n '**/*.[Dd]ockerfile*',\n '**/*.[Cc]ontainerfile*',\n ],\n matchStrings: [\n '# renovate: datasource=(?<datasource>[a-zA-Z0-9-._]+?) depName=(?<depName>[^\\\\s]+?)(?: (lookupName|packageName)=(?<packageName>[^\\\\s]+?))?(?: versioning=(?<versioning>[^\\\\s]+?))?(?: extractVersion=(?<extractVersion>[^\\\\s]+?))?(?: registryUrl=(?<registryUrl>[^\\\\s]+?))?\\\\s(?:ENV|ARG)\\\\s+[A-Za-z0-9_]+?_VERSION[ =][\"\\']?(?<currentValue>.+?)[\"\\']?\\\\s',\n ],\n },\n ],\n description: 'Update `_VERSION` variables in Dockerfiles.',\n },\n githubActionsVersions: {\n customManagers: [\n {\n customType: 'regex',\n managerFilePatterns: [\n '/(^|/)(workflow-templates|\\\\.(?:github|gitea|forgejo)/(?:workflows|actions))/.+\\\\.ya?ml$/',\n '/(^|/)action\\\\.ya?ml$/',\n ],\n matchStrings: [\n '# renovate: datasource=(?<datasource>[a-zA-Z0-9-._]+?) depName=(?<depName>[^\\\\s]+?)(?: (?:lookupName|packageName)=(?<packageName>[^\\\\s]+?))?(?: versioning=(?<versioning>[^\\\\s]+?))?(?: extractVersion=(?<extractVersion>[^\\\\s]+?))?(?: registryUrl=(?<registryUrl>[^\\\\s]+?))?\\\\s+[A-Za-z0-9_]+?_VERSION\\\\s*:\\\\s*[\"\\']?(?<currentValue>.+?)[\"\\']?\\\\s',\n ],\n },\n ],\n description:\n 'Update `_VERSION` environment variables in GitHub Action files.',\n },\n gitlabPipelineVersions: {\n customManagers: [\n {\n customType: 'regex',\n managerFilePatterns: ['**/*.gitlab-ci.{yml,yaml}'],\n matchStrings: [\n '# renovate: datasource=(?<datasource>[a-zA-Z0-9-._]+?) depName=(?<depName>[^\\\\s]+?)(?: (?:packageName)=(?<packageName>[^\\\\s]+?))?(?: versioning=(?<versioning>[^\\\\s]+?))?(?: extractVersion=(?<extractVersion>[^\\\\s]+?))?(?: registryUrl=(?<registryUrl>[^\\\\s]+?))?\\\\s+[A-Za-z0-9_]+?_VERSION\\\\s*:\\\\s*[\"\\']?(?<currentValue>.+?)[\"\\']?\\\\s',\n ],\n },\n ],\n description:\n 'Update `_VERSION` environment variables in GitLab pipeline file.',\n },\n helmChartYamlAppVersions: {\n customManagers: [\n {\n customType: 'regex',\n datasourceTemplate: 'docker',\n managerFilePatterns: ['**/Chart.yaml'],\n matchStrings: [\n '#\\\\s*renovate: image=(?<depName>.*?)\\\\s+appVersion:\\\\s*[\"\\']?(?<currentValue>[\\\\w+\\\\.\\\\-]*)',\n ],\n },\n ],\n description: 'Update `appVersion` value in Helm chart `Chart.yaml`.',\n },\n makefileVersions: {\n customManagers: [\n {\n customType: 'regex',\n managerFilePatterns: ['**/[Mm]akefile', '**/GNUMakefile', '**/*.mk'],\n matchStrings: [\n '# renovate: datasource=(?<datasource>[a-zA-Z0-9-._]+?) depName=(?<depName>[^\\\\s]+?)(?: (?:packageName)=(?<packageName>[^\\\\s]+?))?(?: versioning=(?<versioning>[^\\\\s]+?))?(?: extractVersion=(?<extractVersion>[^\\\\s]+?))?(?: registryUrl=(?<registryUrl>[^\\\\s]+?))?\\\\s+[A-Za-z0-9_]+?_VERSION\\\\s*:*\\\\??=\\\\s*[\"\\']?(?<currentValue>.+?)[\"\\']?\\\\s',\n ],\n },\n ],\n description: 'Update `_VERSION` variables in Makefiles.',\n },\n mavenPropertyVersions: {\n customManagers: [\n {\n customType: 'regex',\n datasourceTemplate:\n '{{#if datasource}}{{{datasource}}}{{else}}maven{{/if}}',\n managerFilePatterns: ['**/pom.xml'],\n matchStrings: [\n '<!--\\\\s?renovate:( datasource=(?<datasource>[a-zA-Z0-9-._]+?))? depName=(?<depName>[^\\\\s]+?)(?: packageName=(?<packageName>[^\\\\s]+?))?(?: versioning=(?<versioning>[^\\\\s]+?))?(?: extractVersion=(?<extractVersion>[^\\\\s]+?))?\\\\s+-->\\\\s+<.+\\\\.version>(?<currentValue>.+)<\\\\/.+\\\\.version>',\n ],\n versioningTemplate: '{{#if versioning}}{{{versioning}}}{{/if}}',\n },\n ],\n description: 'Update `*.version` properties in `pom.xml` files.',\n },\n tfvarsVersions: {\n customManagers: [\n {\n customType: 'regex',\n managerFilePatterns: ['**/*.tfvars'],\n matchStrings: [\n '#\\\\s*renovate: datasource=(?<datasource>.*?) depName=(?<depName>.*?)( versioning=(?<versioning>.*?))?(?: extractVersion=(?<extractVersion>.*?))?(?: registryUrl=(?<registryUrl>[^\\\\s]+?))?\\\\s.*?_version\\\\s*=\\\\s*\"(?<currentValue>.*)\"',\n ],\n versioningTemplate: '{{#if versioning}}{{{versioning}}}{{/if}}',\n },\n ],\n description: 'Update `*_version` variables in `.tfvars` files.',\n },\n tsconfigNodeVersions: {\n customManagers: [\n {\n autoReplaceStringTemplate: '\"@tsconfig/node{{{major}}}/tsconfig.json\"',\n currentValueTemplate: '{{{major}}}',\n customType: 'regex',\n datasourceTemplate: 'npm',\n managerFilePatterns: ['**/{j,t}sconfig.json', '**/{j,t}sconfig.*.json'],\n matchStrings: [\n '\"(?<depName>@tsconfig/node(?<major>\\\\d+))/tsconfig\\\\.json\"',\n ],\n },\n {\n autoReplaceStringTemplate: '\"@tsconfig/node{{{major}}}\"',\n currentValueTemplate: '{{{major}}}',\n customType: 'regex',\n datasourceTemplate: 'npm',\n managerFilePatterns: ['**/{j,t}sconfig.json', '**/{j,t}sconfig.*.json'],\n matchStrings: ['\"(?<depName>@tsconfig/node(?<major>\\\\d+))\"'],\n },\n ],\n description:\n 'Update `@tsconfig/node` extends in `tsconfig.json` and `jsconfig.json` files.',\n },\n valeVersions: {\n customManagers: [\n {\n customType: 'regex',\n datasourceTemplate: 'github-releases',\n managerFilePatterns: ['/(^|/)\\\\.vale\\\\.ini$/'],\n matchStrings: [\n 'https://github\\\\.com/(?<packageName>[^/]+/[^/]+)/releases/download/(?<currentValue>[^/]+)/',\n ],\n },\n ],\n description:\n 'Update Vale package versions in `.vale.ini` configuration files.',\n },\n};\n"],"mappings":";AAEA,MAAa,UAAkC;CAC7C,wBAAwB;EACtB,gBAAgB,CACd;GACE,YAAY;GACZ,qBAAqB,CACnB,mCACA,4BACF;GACA,cAAc,CACZ,sVACF;EACF,CACF;EACA,aACE;CACJ;CACA,eAAe;EACb,gBAAgB,CACd;GACE,YAAY;GACZ,oBAAoB;GACpB,iBAAiB;GACjB,YAAY;GACZ,qBAAqB,CAAC,uBAAuB;GAC7C,cAAc,CAAC,uDAAiD;EAClE,CACF;EACA,aACE;CACJ;CACA,4BAA4B;EAC1B,gBAAgB,CACd;GACE,YAAY;GACZ,qBAAqB,CAAC,oBAAoB;GAC1C,cAAc,CACZ,0VACF;EACF,CACF;EACA,aAAa;CACf;CACA,oBAAoB;EAClB,gBAAgB,CACd;GACE,YAAY;GACZ,qBAAqB;IACnB;IACA;IACA;IACA;GACF;GACA,cAAc,CACZ,6VACF;EACF,CACF;EACA,aAAa;CACf;CACA,uBAAuB;EACrB,gBAAgB,CACd;GACE,YAAY;GACZ,qBAAqB,CACnB,6FACA,wBACF;GACA,cAAc,CACZ,sVACF;EACF,CACF;EACA,aACE;CACJ;CACA,wBAAwB;EACtB,gBAAgB,CACd;GACE,YAAY;GACZ,qBAAqB,CAAC,2BAA2B;GACjD,cAAc,CACZ,2UACF;EACF,CACF;EACA,aACE;CACJ;CACA,0BAA0B;EACxB,gBAAgB,CACd;GACE,YAAY;GACZ,oBAAoB;GACpB,qBAAqB,CAAC,eAAe;GACrC,cAAc,CACZ,6FACF;EACF,CACF;EACA,aAAa;CACf;CACA,kBAAkB;EAChB,gBAAgB,CACd;GACE,YAAY;GACZ,qBAAqB;IAAC;IAAkB;IAAkB;GAAS;GACnE,cAAc,CACZ,iVACF;EACF,CACF;EACA,aAAa;CACf;CACA,uBAAuB;EACrB,gBAAgB,CACd;GACE,YAAY;GACZ,oBACE;GACF,qBAAqB,CAAC,YAAY;GAClC,cAAc,CACZ,6RACF;GACA,oBAAoB;EACtB,CACF;EACA,aAAa;CACf;CACA,gBAAgB;EACd,gBAAgB,CACd;GACE,YAAY;GACZ,qBAAqB,CAAC,aAAa;GACnC,cAAc,CACZ,0OACF;GACA,oBAAoB;EACtB,CACF;EACA,aAAa;CACf;CACA,sBAAsB;EACpB,gBAAgB,CACd;GACE,2BAA2B;GAC3B,sBAAsB;GACtB,YAAY;GACZ,oBAAoB;GACpB,qBAAqB,CAAC,wBAAwB,wBAAwB;GACtE,cAAc,CACZ,8DACF;EACF,GACA;GACE,2BAA2B;GAC3B,sBAAsB;GACtB,YAAY;GACZ,oBAAoB;GACpB,qBAAqB,CAAC,wBAAwB,wBAAwB;GACtE,cAAc,CAAC,8CAA4C;EAC7D,CACF;EACA,aACE;CACJ;CACA,cAAc;EACZ,gBAAgB,CACd;GACE,YAAY;GACZ,oBAAoB;GACpB,qBAAqB,CAAC,uBAAuB;GAC7C,cAAc,CACZ,4FACF;EACF,CACF;EACA,aACE;CACJ;AACF"}
|
|
@@ -87,6 +87,22 @@ query($owner: String!, $name: String!, $number: Int!) {
|
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
`;
|
|
90
|
+
const enqueuePullRequestMutation = `
|
|
91
|
+
mutation EnqueuePullRequest(
|
|
92
|
+
$pullRequestId: ID!,
|
|
93
|
+
) {
|
|
94
|
+
enqueuePullRequest(
|
|
95
|
+
input: {
|
|
96
|
+
pullRequestId: $pullRequestId,
|
|
97
|
+
}
|
|
98
|
+
) {
|
|
99
|
+
mergeQueueEntry {
|
|
100
|
+
id
|
|
101
|
+
position
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
`;
|
|
90
106
|
const enableAutoMergeMutation = `
|
|
91
107
|
mutation EnablePullRequestAutoMerge(
|
|
92
108
|
$pullRequestId: ID!,
|
|
@@ -109,6 +125,6 @@ mutation EnablePullRequestAutoMerge(
|
|
|
109
125
|
}
|
|
110
126
|
`;
|
|
111
127
|
//#endregion
|
|
112
|
-
export { enableAutoMergeMutation, getIssuesQuery, prIsInMergeQueueQuery, repoInfoQuery, repoMergeQueueQuery };
|
|
128
|
+
export { enableAutoMergeMutation, enqueuePullRequestMutation, getIssuesQuery, prIsInMergeQueueQuery, repoInfoQuery, repoMergeQueueQuery };
|
|
113
129
|
|
|
114
130
|
//# sourceMappingURL=graphql.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphql.js","names":[],"sources":["../../../../lib/modules/platform/github/graphql.ts"],"sourcesContent":["export const repoInfoQuery = `\nquery($owner: String!, $name: String!, $user: String) {\n repository(owner: $owner, name: $name) {\n id\n sshUrl\n isFork\n parent {\n nameWithOwner\n }\n isArchived\n nameWithOwner\n hasIssuesEnabled\n hasVulnerabilityAlertsEnabled\n autoMergeAllowed\n mergeCommitAllowed\n rebaseMergeAllowed\n squashMergeAllowed\n mergeQueue { id }\n defaultBranchRef {\n name\n target {\n oid\n }\n }\n issues(\n orderBy: { field: UPDATED_AT, direction: DESC },\n filterBy: { createdBy: $user },\n first: 5\n ) {\n nodes {\n number\n state\n title\n body\n updatedAt\n }\n }\n }\n}\n`;\n\nexport const getIssuesQuery = `\nquery(\n $owner: String!,\n $name: String!,\n $user: String,\n $count: Int,\n $cursor: String\n) {\n repository(owner: $owner, name: $name) {\n issues(\n orderBy: { field: UPDATED_AT, direction: DESC },\n filterBy: { createdBy: $user },\n first: $count,\n after: $cursor\n ) {\n pageInfo {\n endCursor\n hasNextPage\n }\n nodes {\n number\n state\n title\n body\n updatedAt\n }\n }\n }\n}\n`;\n\nexport const repoMergeQueueQuery = `\nquery($owner: String!, $name: String!, $branch: String!) {\n repository(owner: $owner, name: $name) {\n mergeQueue(branch: $branch) {\n id\n }\n }\n}\n`;\n\nexport const prIsInMergeQueueQuery = `\nquery($owner: String!, $name: String!, $number: Int!) {\n repository(owner: $owner, name: $name) {\n pullRequest(number: $number) {\n isInMergeQueue\n }\n }\n}\n`;\n\nexport const enableAutoMergeMutation = `\nmutation EnablePullRequestAutoMerge(\n $pullRequestId: ID!,\n $mergeMethod: PullRequestMergeMethod!,\n $commitHeadline: String,\n $commitBody: String,\n) {\n enablePullRequestAutoMerge(\n input: {\n pullRequestId: $pullRequestId,\n mergeMethod: $mergeMethod,\n commitHeadline: $commitHeadline,\n commitBody: $commitBody,\n }\n ) {\n pullRequest {\n number\n }\n }\n}\n`;\n"],"mappings":";AAAA,MAAa,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyC7B,MAAa,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+B9B,MAAa,sBAAsB;;;;;;;;;AAUnC,MAAa,wBAAwB;;;;;;;;;AAUrC,MAAa,0BAA0B"}
|
|
1
|
+
{"version":3,"file":"graphql.js","names":[],"sources":["../../../../lib/modules/platform/github/graphql.ts"],"sourcesContent":["export const repoInfoQuery = `\nquery($owner: String!, $name: String!, $user: String) {\n repository(owner: $owner, name: $name) {\n id\n sshUrl\n isFork\n parent {\n nameWithOwner\n }\n isArchived\n nameWithOwner\n hasIssuesEnabled\n hasVulnerabilityAlertsEnabled\n autoMergeAllowed\n mergeCommitAllowed\n rebaseMergeAllowed\n squashMergeAllowed\n mergeQueue { id }\n defaultBranchRef {\n name\n target {\n oid\n }\n }\n issues(\n orderBy: { field: UPDATED_AT, direction: DESC },\n filterBy: { createdBy: $user },\n first: 5\n ) {\n nodes {\n number\n state\n title\n body\n updatedAt\n }\n }\n }\n}\n`;\n\nexport const getIssuesQuery = `\nquery(\n $owner: String!,\n $name: String!,\n $user: String,\n $count: Int,\n $cursor: String\n) {\n repository(owner: $owner, name: $name) {\n issues(\n orderBy: { field: UPDATED_AT, direction: DESC },\n filterBy: { createdBy: $user },\n first: $count,\n after: $cursor\n ) {\n pageInfo {\n endCursor\n hasNextPage\n }\n nodes {\n number\n state\n title\n body\n updatedAt\n }\n }\n }\n}\n`;\n\nexport const repoMergeQueueQuery = `\nquery($owner: String!, $name: String!, $branch: String!) {\n repository(owner: $owner, name: $name) {\n mergeQueue(branch: $branch) {\n id\n }\n }\n}\n`;\n\nexport const prIsInMergeQueueQuery = `\nquery($owner: String!, $name: String!, $number: Int!) {\n repository(owner: $owner, name: $name) {\n pullRequest(number: $number) {\n isInMergeQueue\n }\n }\n}\n`;\n\nexport const enqueuePullRequestMutation = `\nmutation EnqueuePullRequest(\n $pullRequestId: ID!,\n) {\n enqueuePullRequest(\n input: {\n pullRequestId: $pullRequestId,\n }\n ) {\n mergeQueueEntry {\n id\n position\n }\n }\n}\n`;\n\nexport const enableAutoMergeMutation = `\nmutation EnablePullRequestAutoMerge(\n $pullRequestId: ID!,\n $mergeMethod: PullRequestMergeMethod!,\n $commitHeadline: String,\n $commitBody: String,\n) {\n enablePullRequestAutoMerge(\n input: {\n pullRequestId: $pullRequestId,\n mergeMethod: $mergeMethod,\n commitHeadline: $commitHeadline,\n commitBody: $commitBody,\n }\n ) {\n pullRequest {\n number\n }\n }\n}\n`;\n"],"mappings":";AAAA,MAAa,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyC7B,MAAa,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+B9B,MAAa,sBAAsB;;;;;;;;;AAUnC,MAAa,wBAAwB;;;;;;;;;AAUrC,MAAa,6BAA6B;;;;;;;;;;;;;;;;AAiB1C,MAAa,0BAA0B"}
|
|
@@ -28,10 +28,10 @@ import { repoFingerprint } from "../util.js";
|
|
|
28
28
|
import { smartTruncate } from "../utils/pr-body.js";
|
|
29
29
|
import { coerceRestPr, githubApi, mapMergeStartegy } from "./common.js";
|
|
30
30
|
import { remoteBranchExists } from "./branch.js";
|
|
31
|
-
import { enableAutoMergeMutation, getIssuesQuery, repoInfoQuery, repoMergeQueueQuery } from "./graphql.js";
|
|
31
|
+
import { enableAutoMergeMutation, enqueuePullRequestMutation, getIssuesQuery, repoInfoQuery, repoMergeQueueQuery } from "./graphql.js";
|
|
32
32
|
import { GithubIssueCache } from "./issue.js";
|
|
33
33
|
import { massageMarkdownLinks } from "./massage-markdown-links.js";
|
|
34
|
-
import { getPrCache, isPrInMergeQueue, updatePrCache } from "./pr.js";
|
|
34
|
+
import { getPrCache, isPrInMergeQueue as isPrInMergeQueue$1, updatePrCache } from "./pr.js";
|
|
35
35
|
import { getAppDetails, getUserDetails, getUserEmail } from "./user.js";
|
|
36
36
|
import { getRepoUrl, isGithubEnterpriseServer, warnIfDefaultGitAuthorEmail } from "./utils.js";
|
|
37
37
|
import { isArray, isNonEmptyObject, isNonEmptyString } from "@sindresorhus/is";
|
|
@@ -69,7 +69,9 @@ var github_exports = /* @__PURE__ */ __exportAll({
|
|
|
69
69
|
id: () => id,
|
|
70
70
|
initPlatform: () => initPlatform,
|
|
71
71
|
initRepo: () => initRepo,
|
|
72
|
+
isBranchMergeQueueEnabled: () => isBranchMergeQueueEnabled,
|
|
72
73
|
isGHApp: () => isGHApp,
|
|
74
|
+
isPrInMergeQueue: () => isPrInMergeQueue,
|
|
73
75
|
listForks: () => listForks,
|
|
74
76
|
massageMarkdown: () => massageMarkdown,
|
|
75
77
|
maxBodyLength: () => maxBodyLength,
|
|
@@ -1246,7 +1248,7 @@ async function createPr({ sourceBranch, targetBranch, prTitle: title, prBody: ra
|
|
|
1246
1248
|
cachePr(result);
|
|
1247
1249
|
return result;
|
|
1248
1250
|
}
|
|
1249
|
-
async function
|
|
1251
|
+
async function isBranchMergeQueueEnabled(baseBranch) {
|
|
1250
1252
|
const cachedResult = config.mergeQueueEnabled[baseBranch];
|
|
1251
1253
|
if (cachedResult !== void 0) return cachedResult;
|
|
1252
1254
|
if (isGithubEnterpriseServer(platformConfig.host) && semver.satisfies(platformConfig.host.version ?? "", "<3.12.0")) {
|
|
@@ -1279,14 +1281,17 @@ async function isMergeQueueEnabled(baseBranch) {
|
|
|
1279
1281
|
config.mergeQueueEnabled[baseBranch] = result;
|
|
1280
1282
|
return result;
|
|
1281
1283
|
}
|
|
1284
|
+
function isPrInMergeQueue(prNo) {
|
|
1285
|
+
return isPrInMergeQueue$1(githubApi, config.repositoryOwner, config.repositoryName, prNo);
|
|
1286
|
+
}
|
|
1282
1287
|
async function assertPrNotInMergeQueue(branchName, baseBranch) {
|
|
1283
|
-
if (!await
|
|
1288
|
+
if (!await isBranchMergeQueueEnabled(baseBranch ?? config.defaultBranch)) return;
|
|
1284
1289
|
const pr = await findPr({
|
|
1285
1290
|
branchName,
|
|
1286
1291
|
state: "open"
|
|
1287
1292
|
});
|
|
1288
1293
|
if (!pr) return;
|
|
1289
|
-
if (await isPrInMergeQueue(
|
|
1294
|
+
if (await isPrInMergeQueue(pr.number)) {
|
|
1290
1295
|
logger.debug(`PR #${pr.number} is in the merge queue - aborting push`);
|
|
1291
1296
|
throw new Error(PR_ALREADY_IN_MERGE_QUEUE);
|
|
1292
1297
|
}
|
|
@@ -1323,8 +1328,38 @@ async function reattemptPlatformAutomerge({ number, platformPrOptions }) {
|
|
|
1323
1328
|
logger.warn({ err }, "Error re-attempting PR platform automerge");
|
|
1324
1329
|
}
|
|
1325
1330
|
}
|
|
1331
|
+
async function tryEnqueuePr(pr) {
|
|
1332
|
+
const prNo = pr.number;
|
|
1333
|
+
try {
|
|
1334
|
+
const res = await githubApi.requestGraphql(enqueuePullRequestMutation, {
|
|
1335
|
+
variables: { pullRequestId: pr.node_id },
|
|
1336
|
+
count: 1
|
|
1337
|
+
});
|
|
1338
|
+
if (res?.errors) {
|
|
1339
|
+
if (res.errors.some((error) => regEx(/already.*queue/i).test(error.message))) {
|
|
1340
|
+
logger.debug(`PR #${prNo} is already in the merge queue`);
|
|
1341
|
+
return true;
|
|
1342
|
+
}
|
|
1343
|
+
logger.debug({
|
|
1344
|
+
prNumber: prNo,
|
|
1345
|
+
errors: res.errors
|
|
1346
|
+
}, "Failed to add PR to the merge queue");
|
|
1347
|
+
return false;
|
|
1348
|
+
}
|
|
1349
|
+
logger.debug(`PR #${prNo} added to the merge queue`);
|
|
1350
|
+
return true;
|
|
1351
|
+
} catch (err) {
|
|
1352
|
+
logger.warn({
|
|
1353
|
+
prNumber: prNo,
|
|
1354
|
+
err
|
|
1355
|
+
}, "Failed to add PR to the merge queue");
|
|
1356
|
+
return false;
|
|
1357
|
+
}
|
|
1358
|
+
}
|
|
1326
1359
|
async function mergePr({ branchName, id: prNo, strategy }) {
|
|
1327
1360
|
logger.debug(`mergePr(${prNo}, ${branchName})`);
|
|
1361
|
+
const pr = await getPr(prNo);
|
|
1362
|
+
if (pr?.targetBranch && await isBranchMergeQueueEnabled(pr.targetBranch)) return tryEnqueuePr(pr);
|
|
1328
1363
|
const url = `repos/${config.parentRepo ?? config.repository}/pulls/${prNo}/merge`;
|
|
1329
1364
|
const options = { body: {} };
|
|
1330
1365
|
/* v8 ignore next -- fork mode is not exercised in mergePr specs */
|
|
@@ -1503,6 +1538,6 @@ async function commitFiles(config) {
|
|
|
1503
1538
|
return await fetchBranch(branchName);
|
|
1504
1539
|
}
|
|
1505
1540
|
//#endregion
|
|
1506
|
-
export { addAssignees, addLabels, addReviewers, assertPrNotInMergeQueue, commitFiles, createFork, createPr, deleteLabel, ensureComment, ensureCommentRemoval, ensureIssue, ensureIssueClosing, findFork, findIssue, findPr, getBranchForceRebase, getBranchPr, getBranchStatus, getBranchStatusCheck, getIssue, getIssueList, getJsonFile, getPr, getPrList, getRawFile, getRepos, getVulnerabilityAlerts, github_exports, id, initPlatform, initRepo, isGHApp, listForks, massageMarkdown, maxBodyLength, mergePr, reattemptPlatformAutomerge, resetConfigs, setBranchStatus, tryReuseAutoclosedPr, updatePr };
|
|
1541
|
+
export { addAssignees, addLabels, addReviewers, assertPrNotInMergeQueue, commitFiles, createFork, createPr, deleteLabel, ensureComment, ensureCommentRemoval, ensureIssue, ensureIssueClosing, findFork, findIssue, findPr, getBranchForceRebase, getBranchPr, getBranchStatus, getBranchStatusCheck, getIssue, getIssueList, getJsonFile, getPr, getPrList, getRawFile, getRepos, getVulnerabilityAlerts, github_exports, id, initPlatform, initRepo, isBranchMergeQueueEnabled, isGHApp, isPrInMergeQueue, listForks, massageMarkdown, maxBodyLength, mergePr, reattemptPlatformAutomerge, resetConfigs, setBranchStatus, tryReuseAutoclosedPr, updatePr };
|
|
1507
1542
|
|
|
1508
1543
|
//# sourceMappingURL=index.js.map
|