-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathIGithubClient.ts
More file actions
43 lines (26 loc) · 1.56 KB
/
IGithubClient.ts
File metadata and controls
43 lines (26 loc) · 1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import { IGithubFile } from "./IGithubFile";
import { IGithubCommit } from "./IGithubCommit";
import { IGithubReference } from "./IGithubReference";
import { IGithubGetTreeResponse } from "./IGithubGetTreeResponse";
import { IGithubCreateTreeResponse } from "./IGithubCreateTreeResponse";
import { IGithubTreeItem } from "./IGithubTreeItem";
import { IGithubCreateBlobReponse } from "./IGithubCreateBlobReponse";
import { IGithubBlob } from "./IGithubBlob";
export interface IGithubClient {
repositoryName: string;
getFileContent(path: string): Promise<IGithubFile>;
getHeads(): Promise<IGithubReference[]>;
getCommit(commitSha: string): Promise<IGithubCommit>;
createCommit(parentCommitSha: string, tree: string, message: string): Promise<IGithubCommit>;
createTree(baseTreeSha: string, treeItems: IGithubTreeItem[]): Promise<IGithubCreateTreeResponse>;
createReference(branch: string, commitSha: string): Promise<void>;
deleteReference(branch: string): Promise<void>;
deleteFile(path: string, blobSha: string, commitMsg: string): Promise<void>;
updateReference(branch: string, commitSha: string): Promise<IGithubReference>;
push(message: string, branch?: string): Promise<void>;
pushTree(treeItems: IGithubTreeItem[], message?: string, branch?: string): Promise<IGithubReference>;
getBlob(blobSha: string): Promise<IGithubBlob>;
createBlob(path: string, content: Uint8Array): Promise<IGithubCreateBlobReponse>;
getLatestCommitTree(): Promise<IGithubGetTreeResponse>;
getLatestCommit(): Promise<IGithubCommit>;
}