Skip to content

Commit

Permalink
refactor: more GlobalConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
rarkins committed Feb 5, 2021
1 parent 4e1271b commit d00d1e8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
4 changes: 3 additions & 1 deletion lib/config/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,12 @@ export interface RenovateSharedConfig {
export interface GlobalAdminConfig {
autodiscover?: boolean;
autodiscoverFilter?: string;
forceCli?: boolean;
gitPrivateKey?: string;
logFile?: string;
logFileLevel?: LogLevel;
logLevel?: LogLevel;
prCommitsPerRunLimit?: number;
redisUrl?: string;
repositories?: RenovateRepository[];
}
Expand Down Expand Up @@ -110,7 +113,6 @@ export interface RenovateAdminConfig {
privateKey?: string | Buffer;
privateKeyPath?: string;
requireConfig?: boolean;
gitPrivateKey?: string;
}

export type PostUpgradeTasks = {
Expand Down
4 changes: 2 additions & 2 deletions lib/config/definitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ const options: RenovateOptions[] = [
name: 'redisUrl',
description:
'If defined, this Redis URL will be used for caching instead of the file system.',
admin: true,
stage: 'global',
type: 'string',
},
{
Expand Down Expand Up @@ -371,7 +371,7 @@ const options: RenovateOptions[] = [
{
name: 'logContext',
description: 'Add a global or per-repo log context to each log entry.',
stage: 'global',
admin: true,
type: 'string',
default: null,
},
Expand Down
6 changes: 3 additions & 3 deletions lib/platform/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import URL from 'url';
import addrs from 'email-addresses';
import { RenovateConfig } from '../config/common';
import { GlobalConfig } from '../config/common';
import { PLATFORM_NOT_FOUND } from '../constants/error-messages';
import { logger } from '../logger';
import { setPrivateKey } from '../util/git';
Expand Down Expand Up @@ -81,8 +81,8 @@ export function parseGitAuthor(input: string): GitAuthor | null {
}

export async function initPlatform(
config: RenovateConfig
): Promise<RenovateConfig> {
config: GlobalConfig
): Promise<GlobalConfig> {
setPrivateKey(config.gitPrivateKey);
setPlatformApi(config.platform);
// TODO: types
Expand Down

0 comments on commit d00d1e8

Please sign in to comment.