qraft
Version:
A powerful CLI tool to qraft structured project setups from GitHub template repositories
54 lines • 1.67 kB
TypeScript
export interface PullRequestOptions {
title?: string;
description?: string;
baseBranch?: string;
headBranch?: string;
draft?: boolean;
autoMerge?: boolean;
labels?: string[];
assignees?: string[];
reviewers?: string[];
}
export interface BoxMetadata {
name: string;
description?: string;
tags: string[];
fileCount: number;
size: string;
}
export interface PullRequestResult {
success: boolean;
prUrl: string;
prNumber: number;
title: string;
description: string;
message: string;
nextSteps: string[];
}
export declare class PullRequestCreator {
private readonly githubToken?;
constructor(githubToken?: string | undefined);
createPullRequest(owner: string, repo: string, boxMetadata: BoxMetadata, options?: PullRequestOptions): Promise<PullRequestResult>;
private generateTitle;
private generateDescription;
private addLabels;
private addAssignees;
private requestReviewers;
generatePRPreview(boxMetadata: BoxMetadata, options?: PullRequestOptions): {
title: string;
description: string;
baseBranch: string;
headBranch: string;
};
checkExistingPR(owner: string, repo: string, boxName: string, headBranch?: string): Promise<{
exists: boolean;
prUrl?: string;
prNumber?: number;
}>;
createPullRequestDryRun(owner: string, repo: string, boxMetadata: BoxMetadata, options?: PullRequestOptions): Promise<PullRequestResult>;
validatePROptions(options: PullRequestOptions): {
valid: boolean;
errors: string[];
};
}
//# sourceMappingURL=pullRequestCreator.d.ts.map