renovate/lib/workers/common.ts
Michael Kriese 6474dd49e5
chore: lint fixes (#7018)
Co-authored-by: Rhys Arkins <rhys@arkins.net>
2020-08-19 06:46:00 +02:00

111 lines
2.6 KiB
TypeScript

import type { Merge } from 'type-fest';
import {
GroupConfig,
RenovateAdminConfig,
RenovateConfig,
RenovateSharedConfig,
ValidationMessage,
} from '../config';
import { Release } from '../datasource';
import {
ArtifactError,
LookupUpdate,
PackageDependency,
PackageFile,
} from '../manager/common';
import { PlatformPrOptions } from '../platform';
import { File } from '../util/git';
import { ChangeLogResult } from './pr/changelog/common';
export interface BranchUpgradeConfig
extends Merge<RenovateConfig, PackageDependency>,
Partial<LookupUpdate>,
RenovateSharedConfig {
artifactErrors?: ArtifactError[];
autoReplaceStringTemplate?: string;
baseDeps?: PackageDependency[];
branchName: string;
commitBody?: string;
commitMessage?: string;
commitMessageExtra?: string;
currentDigest?: string;
currentDigestShort?: string;
currentValue?: string;
currentVersion?: string;
endpoint?: string;
excludeCommitPaths?: string[];
githubName?: string;
group?: GroupConfig;
groupName?: string;
groupSlug?: string;
language?: string;
manager?: string;
packageFile?: string;
reuseExistingBranch?: boolean;
prHeader?: string;
prFooter?: string;
prBodyNotes?: string[];
prBodyTemplate?: string;
prPriority?: number;
prTitle?: string;
releases?: Release[];
releaseTimestamp?: string;
repoName?: string;
sourceDirectory?: string;
updatedPackageFiles?: File[];
updatedArtifacts?: File[];
logJSON?: ChangeLogResult;
}
export enum PrResult {
AwaitingApproval = 'AwaitingApproval',
AwaitingGreenBranch = 'AwaitingGreenBranch',
AwaitingNotPending = 'AwaitingNotPending',
BlockedByBranchAutomerge = 'BlockedByBranchAutomerge',
Created = 'Created',
Error = 'Error',
ErrorAlreadyExists = 'ErrorAlreadyExists',
NotUpdated = 'NotUpdated',
Updated = 'Updated',
}
export type ProcessBranchResult =
| 'already-existed'
| 'automerged'
| 'done'
| 'error'
| 'needs-approval'
| 'needs-pr-approval'
| 'not-scheduled'
| 'no-work'
| 'pending'
| 'pr-created'
| 'pr-edited'
| 'pr-limit-reached'
| 'commit-limit-reached'
| 'rebase';
export interface BranchConfig
extends BranchUpgradeConfig,
RenovateAdminConfig,
PlatformPrOptions {
automergeComment?: string;
automergeType?: string;
baseBranch?: string;
canBeUnpublished?: boolean;
errors?: ValidationMessage[];
hasTypes?: boolean;
dependencyDashboardChecks?: Record<string, string>;
releaseTimestamp?: string;
forceCommit?: boolean;
rebaseRequested?: boolean;
res?: ProcessBranchResult;
upgrades: BranchUpgradeConfig[];
packageFiles?: Record<string, PackageFile[]>;
}