Skip to content

Commit

Permalink
docs(gitea): fix gitUrl support (#34038)
Browse files Browse the repository at this point in the history
  • Loading branch information
viceice authored Feb 5, 2025
1 parent f182708 commit 9756cd9
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 17 deletions.
1 change: 0 additions & 1 deletion docs/usage/self-hosted-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
2 changes: 1 addition & 1 deletion lib/config/options/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
24 changes: 10 additions & 14 deletions lib/config/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<
Expand All @@ -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<string> {
format?: 'regex';
subType: 'string';
supportedManagers?: string[] | 'all';
supportedPlatforms?: string[] | 'all';
}

export interface RenovateNumberArrayOption extends RenovateArrayOption<number> {
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 {
Expand All @@ -510,17 +510,13 @@ export interface RenovateStringOption extends RenovateOptionBase {
// Not used
replaceLineReturns?: boolean;
type: 'string';
supportedManagers?: string[] | 'all';
supportedPlatforms?: string[] | 'all';
}

export interface RenovateObjectOption extends RenovateOptionBase {
default?: any;
additionalProperties?: Record<string, unknown> | boolean;
mergeable?: boolean;
type: 'object';
supportedManagers?: string[] | 'all';
supportedPlatforms?: string[] | 'all';
}

export type RenovateOptions =
Expand Down
2 changes: 1 addition & 1 deletion lib/modules/platform/gerrit/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export async function initRepo({
repository,
gitUrl,
}: RepoParams): Promise<RepoResult> {
logger.debug(`initRepo(${repository}, ${gitUrl!})`);
logger.debug(`initRepo(${repository}, ${gitUrl})`);
const projectInfo = await client.getProjectInfo(repository);
const branchInfo = await client.getBranchInfo(repository);

Expand Down

0 comments on commit 9756cd9

Please sign in to comment.