forked from cee-studio/orca
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgithub.h
22 lines (18 loc) · 1.09 KB
/
github.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#ifndef GITHUB_V3_H
#define GITHUB_V3_H
struct github_git_op_file {
char *path;
char *sha;
};
extern struct github_git_op*
github_git_op_init(char *username, char *token, char *repo_config);
extern char * github_git_op_update_my_fork(struct github_git_op *d);
extern char* github_git_op_get_head_commit(struct github_git_op *data);
extern char* github_git_op_get_tree_sha(struct github_git_op *data, char *commit_sha);
extern void github_git_op_create_blobs(struct github_git_op *data, struct github_git_op_file **files);
extern char* github_git_op_create_tree(struct github_git_op *data, char *base_tree_sha, struct github_git_op_file **files);
extern char* github_git_op_create_a_commit(struct github_git_op *data, char *tree_sha, char *parent_commit_sha, char *commit_msg);
extern void github_git_op_create_a_branch(struct github_git_op *data, char *head_commit_sha, char *branch);
extern void github_git_op_update_a_commit(struct github_git_op *d, char *branch, char *commit_sha);
extern void github_git_op_create_a_pull_request(struct github_git_op *d, char *branch, char *pull_msg);
#endif // GITHUB_V3_H