backport
Version:
A CLI tool that automates the process of backporting commits
34 lines (33 loc) • 1.32 kB
TypeScript
import type { SourceCommitWithTargetPullRequestFragmentFragment } from '../../graphql/generated/graphql.js';
import type { ValidConfigOptions } from '../../options/options.js';
import type { TargetPullRequest } from './get-pull-request-states.js';
export interface Commit {
author: SourceCommitWithTargetPullRequestFragmentFragment['author'];
sourceCommit: {
committedDate: string;
message: string;
sha: string;
branchLabelMapping: ValidConfigOptions['branchLabelMapping'];
};
sourcePullRequest?: {
title: string;
labels: string[];
number: number;
url: string;
mergeCommit?: {
message: string;
sha: string;
};
};
sourceBranch: string;
suggestedTargetBranches: string[];
targetPullRequestStates: TargetPullRequest[];
}
export declare function parseSourceCommit({ sourceCommit, options, }: {
sourceCommit: SourceCommitWithTargetPullRequestFragmentFragment;
options: {
branchLabelMapping?: ValidConfigOptions['branchLabelMapping'];
sourceBranch: string;
};
}): Commit;
export declare const SourceCommitWithTargetPullRequestFragment: import("@graphql-typed-document-node/core").TypedDocumentNode<SourceCommitWithTargetPullRequestFragmentFragment, unknown>;