autoforce
Version:
Developer Automation tool for Github / Gitlab and Salesforce projects.
51 lines (50 loc) • 1.96 kB
TypeScript
export declare class GitHubApi implements IGitApi {
repoVar: {
owner: string;
repo: string;
};
projectNumber: number | undefined;
graphqlAuth: import("@octokit/graphql/types").graphql;
octokit: import("@octokit/core").Octokit & {
paginate: import("@octokit/plugin-paginate-rest").PaginateInterface;
} & import("@octokit/plugin-paginate-graphql").paginateGraphQLInterface & import("@octokit/plugin-rest-endpoint-methods").Api & {
retry: {
retryRequest: (error: import("octokit").RequestError, retries: number, retryAfter: number) => import("octokit").RequestError;
};
};
_repository: IRepository | undefined;
_labels: ILabel[] | undefined;
_milestones: IMilestone[] | undefined;
_defaultColors: Record<string, string>;
getRepository(): Promise<IRepository>;
constructor(token: string, owner: string, repo: string, projectNumber?: number);
createLabel(name: string, color?: string): Promise<ILabel | undefined>;
getRandomColor(): string;
updateMilestone(title: string, state?: string, description?: string, dueOn?: string): Promise<{
id: any;
title: any;
description: any;
dueOn: any;
url: any;
}>;
createMilestone(title: string, state?: string, description?: string, dueOn?: string): Promise<{
id: any;
title: any;
description: any;
dueOn: any;
url: any;
}>;
getUser(): Promise<{
login: string;
id: number;
}>;
getLabels(): Promise<ILabel[]>;
getMilestones(): Promise<IMilestone[]>;
getRepositoryObject(): Promise<IRepository>;
createPullRequest(branchName: string, title: string, body: string): Promise<boolean>;
assignBranchToIssue(issueNumber: string, branchName: string, commitSha: string): Promise<boolean>;
getCommit(commitSha: string): Promise<{
id: string;
oid: string;
}>;
}