renovate 44.164.8 → 44.164.9
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.
|
@@ -37,7 +37,7 @@ function getRepoUrl(repo, gitUrl, endpoint) {
|
|
|
37
37
|
hostType: "scm-manager",
|
|
38
38
|
url: endpoint
|
|
39
39
|
});
|
|
40
|
-
repoUrl.username = hostOptions.username ?? "";
|
|
40
|
+
repoUrl.username = hostOptions.username ?? "x-access-token";
|
|
41
41
|
repoUrl.password = hostOptions.token ?? "";
|
|
42
42
|
return repoUrl.toString();
|
|
43
43
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","names":["hostRules.find"],"sources":["../../../../lib/modules/platform/scm-manager/utils.ts"],"sourcesContent":["import type { MergeStrategy } from '../../../config/types.ts';\nimport { logger } from '../../../logger/index.ts';\nimport * as hostRules from '../../../util/host-rules.ts';\nimport { regEx } from '../../../util/regex.ts';\nimport { parseUrl } from '../../../util/url.ts';\nimport type { GitUrlOption, Pr } from '../types.ts';\nimport type { PrMergeMethod, Repo } from './schema.ts';\nimport type { PrFilterByState } from './types.ts';\n\nexport function mapPrState(\n state: 'open' | 'closed' | undefined,\n): 'OPEN' | 'REJECTED' | undefined {\n switch (state) {\n case 'open':\n return 'OPEN';\n case 'closed':\n return 'REJECTED';\n default:\n return undefined;\n }\n}\n\nexport function matchPrState(pr: Pr, state: PrFilterByState): boolean {\n if (state === 'all') {\n return true;\n }\n\n if (state === '!open' && (pr.state === 'closed' || pr.state === 'merged')) {\n return true;\n }\n\n return state === pr.state;\n}\n\nexport function smartLinks(body: string): string {\n return body.replace(regEx(/]\\(\\.\\.\\/pull\\//g), '](pulls/');\n}\n\nexport function getRepoUrl(\n repo: Repo,\n gitUrl: GitUrlOption | undefined,\n endpoint: string,\n): string {\n const protocolLinks = repo._links.protocol;\n\n if (!protocolLinks) {\n throw new Error('Missing protocol links.');\n }\n\n if (!Array.isArray(protocolLinks)) {\n throw new Error('Expected protocol links to be an array of links.');\n }\n\n if (gitUrl === 'ssh') {\n const sshUrl = protocolLinks.find((l) => l.name === 'ssh')?.href;\n if (!sshUrl) {\n throw new Error('MISSING_SSH_LINKS');\n }\n\n logger.debug(`Using SSH URL: ${sshUrl}`);\n return sshUrl;\n }\n\n const httpUrl = protocolLinks.find((l) => l.name === 'http')?.href;\n if (!httpUrl) {\n throw new Error('MISSING_HTTP_LINK');\n }\n\n logger.debug(`Using HTTP URL: ${httpUrl}`);\n\n const repoUrl = parseUrl(httpUrl);\n if (!repoUrl) {\n throw new Error('MALFORMED_HTTP_LINK');\n }\n\n const hostOptions = hostRules.find({\n hostType: 'scm-manager',\n url: endpoint,\n });\n\n repoUrl.username = hostOptions.username ?? '';\n repoUrl.password = hostOptions.token ?? '';\n\n return repoUrl.toString();\n}\n\nexport function getMergeMethod(\n strategy: MergeStrategy | undefined,\n): PrMergeMethod | null {\n switch (strategy) {\n case 'fast-forward':\n return 'FAST_FORWARD_ONLY';\n case 'merge-commit':\n return 'MERGE_COMMIT';\n case 'rebase':\n return 'REBASE';\n case 'squash':\n return 'SQUASH';\n default:\n return null;\n }\n}\n"],"mappings":";;;;;AASA,SAAgB,WACd,OACiC;CACjC,QAAQ,OAAR;EACE,KAAK,QACH,OAAO;EACT,KAAK,UACH,OAAO;EACT,SACE;CACJ;AACF;AAEA,SAAgB,aAAa,IAAQ,OAAiC;CACpE,IAAI,UAAU,OACZ,OAAO;CAGT,IAAI,UAAU,YAAY,GAAG,UAAU,YAAY,GAAG,UAAU,WAC9D,OAAO;CAGT,OAAO,UAAU,GAAG;AACtB;AAEA,SAAgB,WAAW,MAAsB;CAC/C,OAAO,KAAK,QAAQ,MAAM,kBAAkB,GAAG,UAAU;AAC3D;AAEA,SAAgB,WACd,MACA,QACA,UACQ;CACR,MAAM,gBAAgB,KAAK,OAAO;CAElC,IAAI,CAAC,eACH,MAAM,IAAI,MAAM,yBAAyB;CAG3C,IAAI,CAAC,MAAM,QAAQ,aAAa,GAC9B,MAAM,IAAI,MAAM,kDAAkD;CAGpE,IAAI,WAAW,OAAO;EACpB,MAAM,SAAS,cAAc,MAAM,MAAM,EAAE,SAAS,KAAK,CAAC,EAAE;EAC5D,IAAI,CAAC,QACH,MAAM,IAAI,MAAM,mBAAmB;EAGrC,OAAO,MAAM,kBAAkB,QAAQ;EACvC,OAAO;CACT;CAEA,MAAM,UAAU,cAAc,MAAM,MAAM,EAAE,SAAS,MAAM,CAAC,EAAE;CAC9D,IAAI,CAAC,SACH,MAAM,IAAI,MAAM,mBAAmB;CAGrC,OAAO,MAAM,mBAAmB,SAAS;CAEzC,MAAM,UAAU,SAAS,OAAO;CAChC,IAAI,CAAC,SACH,MAAM,IAAI,MAAM,qBAAqB;CAGvC,MAAM,cAAcA,KAAe;EACjC,UAAU;EACV,KAAK;CACP,CAAC;
|
|
1
|
+
{"version":3,"file":"utils.js","names":["hostRules.find"],"sources":["../../../../lib/modules/platform/scm-manager/utils.ts"],"sourcesContent":["import type { MergeStrategy } from '../../../config/types.ts';\nimport { logger } from '../../../logger/index.ts';\nimport * as hostRules from '../../../util/host-rules.ts';\nimport { regEx } from '../../../util/regex.ts';\nimport { parseUrl } from '../../../util/url.ts';\nimport type { GitUrlOption, Pr } from '../types.ts';\nimport type { PrMergeMethod, Repo } from './schema.ts';\nimport type { PrFilterByState } from './types.ts';\n\nexport function mapPrState(\n state: 'open' | 'closed' | undefined,\n): 'OPEN' | 'REJECTED' | undefined {\n switch (state) {\n case 'open':\n return 'OPEN';\n case 'closed':\n return 'REJECTED';\n default:\n return undefined;\n }\n}\n\nexport function matchPrState(pr: Pr, state: PrFilterByState): boolean {\n if (state === 'all') {\n return true;\n }\n\n if (state === '!open' && (pr.state === 'closed' || pr.state === 'merged')) {\n return true;\n }\n\n return state === pr.state;\n}\n\nexport function smartLinks(body: string): string {\n return body.replace(regEx(/]\\(\\.\\.\\/pull\\//g), '](pulls/');\n}\n\nexport function getRepoUrl(\n repo: Repo,\n gitUrl: GitUrlOption | undefined,\n endpoint: string,\n): string {\n const protocolLinks = repo._links.protocol;\n\n if (!protocolLinks) {\n throw new Error('Missing protocol links.');\n }\n\n if (!Array.isArray(protocolLinks)) {\n throw new Error('Expected protocol links to be an array of links.');\n }\n\n if (gitUrl === 'ssh') {\n const sshUrl = protocolLinks.find((l) => l.name === 'ssh')?.href;\n if (!sshUrl) {\n throw new Error('MISSING_SSH_LINKS');\n }\n\n logger.debug(`Using SSH URL: ${sshUrl}`);\n return sshUrl;\n }\n\n const httpUrl = protocolLinks.find((l) => l.name === 'http')?.href;\n if (!httpUrl) {\n throw new Error('MISSING_HTTP_LINK');\n }\n\n logger.debug(`Using HTTP URL: ${httpUrl}`);\n\n const repoUrl = parseUrl(httpUrl);\n if (!repoUrl) {\n throw new Error('MALFORMED_HTTP_LINK');\n }\n\n const hostOptions = hostRules.find({\n hostType: 'scm-manager',\n url: endpoint,\n });\n\n // SCM-Manager ignores the username for API keys, `x-access-token` is our own choice and not documented by SCM-Manager\n repoUrl.username = hostOptions.username ?? 'x-access-token';\n repoUrl.password = hostOptions.token ?? '';\n\n return repoUrl.toString();\n}\n\nexport function getMergeMethod(\n strategy: MergeStrategy | undefined,\n): PrMergeMethod | null {\n switch (strategy) {\n case 'fast-forward':\n return 'FAST_FORWARD_ONLY';\n case 'merge-commit':\n return 'MERGE_COMMIT';\n case 'rebase':\n return 'REBASE';\n case 'squash':\n return 'SQUASH';\n default:\n return null;\n }\n}\n"],"mappings":";;;;;AASA,SAAgB,WACd,OACiC;CACjC,QAAQ,OAAR;EACE,KAAK,QACH,OAAO;EACT,KAAK,UACH,OAAO;EACT,SACE;CACJ;AACF;AAEA,SAAgB,aAAa,IAAQ,OAAiC;CACpE,IAAI,UAAU,OACZ,OAAO;CAGT,IAAI,UAAU,YAAY,GAAG,UAAU,YAAY,GAAG,UAAU,WAC9D,OAAO;CAGT,OAAO,UAAU,GAAG;AACtB;AAEA,SAAgB,WAAW,MAAsB;CAC/C,OAAO,KAAK,QAAQ,MAAM,kBAAkB,GAAG,UAAU;AAC3D;AAEA,SAAgB,WACd,MACA,QACA,UACQ;CACR,MAAM,gBAAgB,KAAK,OAAO;CAElC,IAAI,CAAC,eACH,MAAM,IAAI,MAAM,yBAAyB;CAG3C,IAAI,CAAC,MAAM,QAAQ,aAAa,GAC9B,MAAM,IAAI,MAAM,kDAAkD;CAGpE,IAAI,WAAW,OAAO;EACpB,MAAM,SAAS,cAAc,MAAM,MAAM,EAAE,SAAS,KAAK,CAAC,EAAE;EAC5D,IAAI,CAAC,QACH,MAAM,IAAI,MAAM,mBAAmB;EAGrC,OAAO,MAAM,kBAAkB,QAAQ;EACvC,OAAO;CACT;CAEA,MAAM,UAAU,cAAc,MAAM,MAAM,EAAE,SAAS,MAAM,CAAC,EAAE;CAC9D,IAAI,CAAC,SACH,MAAM,IAAI,MAAM,mBAAmB;CAGrC,OAAO,MAAM,mBAAmB,SAAS;CAEzC,MAAM,UAAU,SAAS,OAAO;CAChC,IAAI,CAAC,SACH,MAAM,IAAI,MAAM,qBAAqB;CAGvC,MAAM,cAAcA,KAAe;EACjC,UAAU;EACV,KAAK;CACP,CAAC;CAGD,QAAQ,WAAW,YAAY,YAAY;CAC3C,QAAQ,WAAW,YAAY,SAAS;CAExC,OAAO,QAAQ,SAAS;AAC1B"}
|
package/package.json
CHANGED
package/renovate-schema.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$id": "https://docs.renovatebot.com/renovate-schema.json",
|
|
3
|
-
"title": "JSON schema for Renovate 44.164.
|
|
3
|
+
"title": "JSON schema for Renovate 44.164.9 config files (https://renovatebot.com/)",
|
|
4
4
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
5
|
-
"x-renovate-version": "44.164.
|
|
5
|
+
"x-renovate-version": "44.164.9",
|
|
6
6
|
"allowComments": true,
|
|
7
7
|
"type": "object",
|
|
8
8
|
"definitions": {
|