UNPKG

backport

Version:

A CLI tool that automates the process of backporting commits

94 lines (93 loc) 2.58 kB
import winston from 'winston'; export interface TargetBranchChoice { name: string; checked?: boolean; } export type TargetBranchChoiceOrString = string | TargetBranchChoice; type AutoFixConflictsHandler = ({ files, directory, logger, targetBranch, }: { files: string[]; directory: string; logger: winston.Logger; targetBranch: string; }) => boolean | Promise<boolean>; type Options = Partial<{ accessToken: string; assignees: string[]; author: string | null; autoAssign: boolean; autoFixConflicts: AutoFixConflictsHandler; autoMerge: boolean; autoMergeMethod: string; backportBinary: string; backportBranchName: string; cherrypickRef: boolean; commitConflicts: boolean; commitPaths: string[]; copySourcePRLabels: boolean; copySourcePRReviewers: boolean; details: boolean; dir: string; draft: boolean; dryRun: boolean; editor: string; fork: boolean; gitAuthorEmail: string; gitAuthorName: string; gitHostname: string; githubActionRunId: number; githubApiBaseUrlV3: string; githubApiBaseUrlV4: string; interactive: boolean; logFilePath: string; ls: boolean; maxNumber: number; multiple: boolean; multipleBranches: boolean; multipleCommits: boolean; noVerify: boolean; prDescription: string; prFilter: string; projectConfigFile: string; prTitle: string; publishStatusCommentOnAbort: boolean; publishStatusCommentOnFailure: boolean; publishStatusCommentOnSuccess: boolean; pullNumber: number | number[]; repoForkOwner: string; repoName: string; repoOwner: string; resetAuthor: boolean; reviewers: string[]; sha: string | string[]; signoff: boolean; skipRemoteConfig: boolean; noUnmergedBackportsHelp: boolean; sourceBranch: string; sourcePRLabels: string[]; targetBranchChoices: TargetBranchChoiceOrString[]; targetBranches: string[]; targetPRLabels: string[]; }>; export type ConfigFileOptions = Options & Partial<{ help: boolean; version: boolean; v: boolean; branchLabelMapping: Record<string, string>; /** * @deprecated Replaced by `repoOwner` and `repoName` */ upstream: string; /** * @deprecated Replaced by `targetBranchChoices` */ branches: TargetBranchChoiceOrString[]; /** * @deprecated Replaced by `targetPRLabels` */ labels: string[]; /** * @deprecated Replaced by `copySourcePRReviewers` */ addOriginalReviewers: boolean; }>; export {};