-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathGitHub_queries.mli
160 lines (138 loc) · 3.69 KB
/
GitHub_queries.mli
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
open GitHub_types
val get_pull_request_cards :
bot_info:Bot_info.t
-> owner:string
-> repo:string
-> number:int
-> ((GitHub_ID.t * int) list, string) result Lwt.t
val get_pull_request_milestone :
bot_info:Bot_info.t
-> pr_id:GitHub_ID.t
-> (backport_info list, string) result Lwt.t
val get_pull_request_id_and_milestone :
bot_info:Bot_info.t
-> owner:string
-> repo:string
-> number:int
-> (GitHub_ID.t * backport_info list, string) result Lwt.t
val get_pull_request_id :
bot_info:Bot_info.t
-> owner:string
-> repo:string
-> number:int
-> (GitHub_ID.t, string) result Lwt.t
val get_milestone_id :
bot_info:Bot_info.t
-> owner:string
-> repo:string
-> number:int
-> (GitHub_ID.t, string) result Lwt.t
val get_team_membership :
bot_info:Bot_info.t
-> org:string
-> team:string
-> user:string
-> (bool, string) result Lwt.t
val get_pull_request_refs :
bot_info:Bot_info.t
-> owner:string
-> repo:string
-> number:int
-> (GitHub_ID.t pull_request_info, string) result Lwt.t
val get_pull_request_reviews_refs :
bot_info:Bot_info.t
-> owner:string
-> repo:string
-> number:int
-> (pull_request_reviews_info, string) result Lwt.t
val get_file_content :
bot_info:Bot_info.t
-> owner:string
-> repo:string
-> branch:string
-> file_name:string
-> (string option, string) result Lwt.t
val get_default_branch :
bot_info:Bot_info.t
-> owner:string
-> repo:string
-> (string, string) result Lwt.t
val get_issue_closer_info :
bot_info:Bot_info.t
-> issue
-> (issue_closer_info closed_by, string) result Lwt.t
val get_repository_id :
bot_info:Bot_info.t
-> owner:string
-> repo:string
-> (GitHub_ID.t, string) result Lwt.t
val get_status_check :
bot_info:Bot_info.t
-> owner:string
-> repo:string
-> commit:string
-> context:string
-> (bool, string) result Lwt.t
(* N.B. the [bool option] is [None] for in progress and [Some success_status] for finished *)
(* TODO: Should we use a type for this instead of [bool option]? *)
type base_and_head_checks_info =
{ pr_id: GitHub_ID.t
; base_checks: (check_tab_info * bool option, string * string) result list
; head_checks: (check_tab_info * bool option, string * string) result list
; draft: bool
; labels: string list }
val get_base_and_head_checks :
bot_info:Bot_info.t
-> owner:string
-> repo:string
-> pr_number:int
-> base:string
-> head:string
-> (base_and_head_checks_info, string) result Lwt.t
val get_pipeline_summary :
bot_info:Bot_info.t
-> owner:string
-> repo:string
-> head:string
-> (string, string) result Lwt.t
val get_open_pull_requests_with_label :
bot_info:Bot_info.t
-> owner:string
-> repo:string
-> label:string
-> ((GitHub_ID.t * int) list, string) result Lwt.t
(* Can return [None] if the label is not found *)
val get_label :
bot_info:Bot_info.t
-> owner:string
-> repo:string
-> label:string
-> (GitHub_ID.t option, string) result Lwt.t
val get_pull_request_label_timeline :
bot_info:Bot_info.t
-> owner:string
-> repo:string
-> pr_number:int
-> ((bool * string * float) list, string) result Lwt.t
val get_pull_request_labels :
bot_info:Bot_info.t
-> owner:string
-> repo:string
-> pr_number:int
-> (string list, string) result Lwt.t
val get_project_field_values :
bot_info:Bot_info.t
-> organization:string
-> project:int
-> field:string
-> options:string array
-> ( GitHub_ID.t * (GitHub_ID.t * (string * string) list) option
, string )
result
Lwt.t
val get_artifact_blob :
bot_info:Bot_info.t
-> owner:string
-> repo:string
-> artifact_id:string
-> ((string * string) list, string) result Lwt.t