@pagopa/dx-cli
Version:
A CLI useful to manage DX tools.
38 lines (37 loc) • 1.04 kB
TypeScript
export interface GitHubService {
/**
* Creates a pull request in a GitHub repository.
* @throws Error if pull request creation fails
*/
createPullRequest(params: PullRequestBody): Promise<PullRequest>;
/**
* Gets a GitHub repository by owner and name.
* @throws RepositoryNotFoundError if repository doesn't exist (404)
* @throws Error for other failures
*/
getRepository(owner: string, name: string): Promise<Repository>;
}
type PullRequestBody = {
base: string;
body: string;
head: string;
owner: string;
repo: string;
title: string;
};
export declare class PullRequest {
readonly url: string;
constructor(url: string);
}
export declare class Repository {
readonly name: string;
readonly owner: string;
get fullName(): string;
get ssh(): string;
get url(): string;
constructor(name: string, owner: string);
}
export declare class RepositoryNotFoundError extends Error {
constructor(owner: string, name: string);
}
export {};