Skip to content

Commit

Permalink
refactor: move dependencyDashboardRebaseAllOpen parameter closely to …
Browse files Browse the repository at this point in the history
…worker (#16628)
  • Loading branch information
MaronHatoum committed Jul 18, 2022
1 parent a6e5eef commit a93cd9f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
1 change: 0 additions & 1 deletion lib/config/types.ts
Expand Up @@ -212,7 +212,6 @@ export interface RenovateConfig
dependencyDashboardAutoclose?: boolean;
dependencyDashboardChecks?: Record<string, string>;
dependencyDashboardIssue?: number;
dependencyDashboardRebaseAllOpen?: boolean;
dependencyDashboardTitle?: string;
dependencyDashboardHeader?: string;
dependencyDashboardFooter?: string;
Expand Down
8 changes: 5 additions & 3 deletions lib/workers/repository/dependency-dashboard.ts
Expand Up @@ -7,7 +7,7 @@ import { getProblems, logger } from '../../logger';
import { platform } from '../../modules/platform';
import { regEx } from '../../util/regex';
import * as template from '../../util/template';
import { BranchConfig, BranchResult } from '../types';
import { BranchConfig, BranchResult, SelectAllConfig } from '../types';
import { PackageFiles } from './package-files';

interface DependencyDashboard {
Expand Down Expand Up @@ -36,7 +36,9 @@ function parseDashboardIssue(issueBody: string): DependencyDashboard {
return { dependencyDashboardChecks, dependencyDashboardRebaseAllOpen };
}

export async function readDashboardBody(config: RenovateConfig): Promise<void> {
export async function readDashboardBody(
config: SelectAllConfig
): Promise<void> {
config.dependencyDashboardChecks = {};
const stringifiedConfig = JSON.stringify(config);
if (
Expand Down Expand Up @@ -97,7 +99,7 @@ function appendRepoProblems(config: RenovateConfig, issueBody: string): string {
}

export async function ensureDependencyDashboard(
config: RenovateConfig,
config: SelectAllConfig,
allBranches: BranchConfig[]
): Promise<void> {
// legacy/migrated issue
Expand Down
6 changes: 6 additions & 0 deletions lib/workers/types.ts
Expand Up @@ -145,3 +145,9 @@ export interface DepWarnings {
warnings: string[];
warningFiles: string[];
}

export interface SelectAllConfig extends RenovateConfig {
dependencyDashboardRebaseAllOpen?: boolean;
dependencyDashboardAllPending?: boolean;
dependencyDashboardAllRateLimited?: boolean;
}

0 comments on commit a93cd9f

Please sign in to comment.