From 9756cd9c15760ce7469ae8fa9d699d59174092f4 Mon Sep 17 00:00:00 2001 From: Michael Kriese Date: Wed, 5 Feb 2025 10:17:36 +0100 Subject: [PATCH] docs(gitea): fix `gitUrl` support (#34038) --- docs/usage/self-hosted-configuration.md | 1 - lib/config/options/index.ts | 2 +- lib/config/types.ts | 24 ++++++++++-------------- lib/modules/platform/gerrit/index.ts | 2 +- 4 files changed, 12 insertions(+), 17 deletions(-) diff --git a/docs/usage/self-hosted-configuration.md b/docs/usage/self-hosted-configuration.md index 2f0f680b5f6a04..b33a68677c2e40 100644 --- a/docs/usage/self-hosted-configuration.md +++ b/docs/usage/self-hosted-configuration.md @@ -770,7 +770,6 @@ To handle the case where the underlying Git processes appear to hang, configure ## gitUrl Override the default resolution for Git remote, e.g. to switch GitLab from HTTPS to SSH-based. -Currently works for Bitbucket Server and GitLab only. Possible values: diff --git a/lib/config/options/index.ts b/lib/config/options/index.ts index 6f20b33e45becb..79cc61f495b4c6 100644 --- a/lib/config/options/index.ts +++ b/lib/config/options/index.ts @@ -2914,7 +2914,7 @@ const options: RenovateOptions[] = [ description: 'Overrides the default resolution for Git remote, e.g. to switch GitLab from HTTPS to SSH-based.', type: 'string', - supportedPlatforms: ['gitlab', 'bitbucket-server'], + supportedPlatforms: ['gitea', 'gitlab', 'bitbucket-server'], allowedValues: ['default', 'ssh', 'endpoint'], default: 'default', stage: 'repository', diff --git a/lib/config/types.ts b/lib/config/types.ts index d3c38f602112a3..f3d5a481e5fc57 100644 --- a/lib/config/types.ts +++ b/lib/config/types.ts @@ -463,6 +463,16 @@ export interface RenovateOptionBase { * For internal use only: add it to any config option of type integer that supports negative integers */ allowNegative?: boolean; + + /** + * Managers which support this option, leave undefined if all managers support it. + */ + supportedManagers?: string[]; + + /** + * Platforms which support this option, leave undefined if all platforms support it. + */ + supportedPlatforms?: PlatformId[]; } export interface RenovateArrayOption< @@ -472,35 +482,25 @@ export interface RenovateArrayOption< mergeable?: boolean; type: 'array'; subType?: 'string' | 'object' | 'number'; - supportedManagers?: string[] | 'all'; - supportedPlatforms?: string[] | 'all'; } export interface RenovateStringArrayOption extends RenovateArrayOption { format?: 'regex'; subType: 'string'; - supportedManagers?: string[] | 'all'; - supportedPlatforms?: string[] | 'all'; } export interface RenovateNumberArrayOption extends RenovateArrayOption { subType: 'number'; - supportedManagers?: string[] | 'all'; - supportedPlatforms?: string[] | 'all'; } export interface RenovateBooleanOption extends RenovateOptionBase { default?: boolean | null; type: 'boolean'; - supportedManagers?: string[] | 'all'; - supportedPlatforms?: string[] | 'all'; } export interface RenovateIntegerOption extends RenovateOptionBase { default?: number | null; type: 'integer'; - supportedManagers?: string[] | 'all'; - supportedPlatforms?: string[] | 'all'; } export interface RenovateStringOption extends RenovateOptionBase { @@ -510,8 +510,6 @@ export interface RenovateStringOption extends RenovateOptionBase { // Not used replaceLineReturns?: boolean; type: 'string'; - supportedManagers?: string[] | 'all'; - supportedPlatforms?: string[] | 'all'; } export interface RenovateObjectOption extends RenovateOptionBase { @@ -519,8 +517,6 @@ export interface RenovateObjectOption extends RenovateOptionBase { additionalProperties?: Record | boolean; mergeable?: boolean; type: 'object'; - supportedManagers?: string[] | 'all'; - supportedPlatforms?: string[] | 'all'; } export type RenovateOptions = diff --git a/lib/modules/platform/gerrit/index.ts b/lib/modules/platform/gerrit/index.ts index 234d9965631f56..bae6b5114090f5 100644 --- a/lib/modules/platform/gerrit/index.ts +++ b/lib/modules/platform/gerrit/index.ts @@ -96,7 +96,7 @@ export async function initRepo({ repository, gitUrl, }: RepoParams): Promise { - logger.debug(`initRepo(${repository}, ${gitUrl!})`); + logger.debug(`initRepo(${repository}, ${gitUrl})`); const projectInfo = await client.getProjectInfo(repository); const branchInfo = await client.getBranchInfo(repository);