-
Notifications
You must be signed in to change notification settings - Fork 1
/
github_issues_labels.body.sql
227 lines (152 loc) · 4.04 KB
/
github_issues_labels.body.sql
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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
create or replace package body github_issues_labels
as
function list_repos_labels (
git_account varchar2
, repos_name varchar2
)
return github.call_result
as
begin
github.init_talk('/repos/' || git_account || '/' || repos_name || '/labels', 'GET');
github.talk(
github_account => git_account
);
return github.github_response_result;
end list_repos_labels;
function get_label (
git_account varchar2
, repos_name varchar2
, label varchar2
)
return github.call_result
as
begin
github.init_talk('/repos/' || git_account || '/' || repos_name || '/labels/' || label, 'GET');
github.talk(
github_account => git_account
);
return github.github_response_result;
end get_label;
procedure create_label (
git_account varchar2
, repos_name varchar2
, label varchar2
, color varchar2
)
as
begin
github.init_talk('/repos/' || git_account || '/' || repos_name || '/labels', 'POST');
github.github_call_request.call_json.put('label', label);
github.github_call_request.call_json.put('color', color);
github.talk(
github_account => git_account
);
end create_label;
procedure update_label (
git_account varchar2
, repos_name varchar2
, label varchar2
, color varchar2
)
as
begin
github.init_talk('/repos/' || git_account || '/' || repos_name || '/labels/' || label, 'PATCH');
github.github_call_request.call_json.put('label', label);
github.github_call_request.call_json.put('color', color);
github.talk(
github_account => git_account
);
end update_label;
procedure delete_label (
git_account varchar2
, repos_name varchar2
, label varchar2
)
as
begin
github.init_talk('/repos/' || git_account || '/' || repos_name || '/labels/' || label, 'DELETE');
github.talk(
github_account => git_account
);
end delete_label;
function list_issue_labels (
git_account varchar2
, repos_name varchar2
, issue_id number
)
return github.call_result
as
begin
github.init_talk('/repos/' || git_account || '/' || repos_name || '/issues/' || issue_id || '/labels', 'GET');
github.talk(
github_account => git_account
);
return github.github_response_result;
end list_issue_labels;
procedure add_labels_to_issue (
git_account varchar2
, repos_name varchar2
, issue_id number
, labels json_list
)
as
begin
github.init_talk('/repos/' || git_account || '/' || repos_name || '/issues/' || issue_id || '/labels', 'POST');
github.talk(
github_account => git_account
);
end add_labels_to_issue;
procedure remove_label_from_issue (
git_account varchar2
, repos_name varchar2
, issue_id number
, label varchar2
)
as
begin
github.init_talk('/repos/' || git_account || '/' || repos_name || '/issues/' || issue_id || '/labels/' || label, 'DELETE');
github.talk(
github_account => git_account
);
end remove_label_from_issue;
procedure replace_all_labels_issue (
git_account varchar2
, repos_name varchar2
, issue_id number
, labels json_list
)
as
begin
github.init_talk('/repos/' || git_account || '/' || repos_name || '/issues/' || issue_id || '/labels', 'PUT');
github.talk(
github_account => git_account
);
end replace_all_labels_issue;
procedure remove_labels_issue (
git_account varchar2
, repos_name varchar2
, issue_id number
)
as
begin
github.init_talk('/repos/' || git_account || '/' || repos_name || '/issues/' || issue_id || '/labels', 'DELETE');
github.talk(
github_account => git_account
);
end remove_labels_issue;
function labels_from_milestone (
git_account varchar2
, repos_name varchar2
, milestone_id number
)
return github.call_result
as
begin
github.init_talk('/repos/' || git_account || '/' || repos_name || '/milestones/' || milestone_id || '/labels', 'GET');
github.talk(
github_account => git_account
);
return github.github_response_result;
end labels_from_milestone;
end github_issues_labels;
/