@@ 179-190 (lines=12) @@ | ||
176 | * |
|
177 | * @return array |
|
178 | */ |
|
179 | public function createIssue(string $title, string $body = '', string $assignee = '', int $milestone = 0, |
|
180 | array $labels = []): array |
|
181 | { |
|
182 | return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/issues', $this->getOwner(), |
|
183 | $this->getRepo()), Request::METHOD_POST, [ |
|
184 | 'title' => $title, |
|
185 | 'body' => $body, |
|
186 | 'assignee' => $assignee, |
|
187 | 'milestone' => $milestone, |
|
188 | 'labels' => $labels |
|
189 | ]); |
|
190 | } |
|
191 | ||
192 | /** |
|
193 | * Edit an issue |
|
@@ 206-218 (lines=13) @@ | ||
203 | * |
|
204 | * @return array |
|
205 | */ |
|
206 | public function editIssue(int $number, string $title = '', string $body = '', string $assignee = '', |
|
207 | int $milestone = 0, array $labels = []): array |
|
208 | { |
|
209 | return $this->getApi()->request($this->getApi() |
|
210 | ->sprintf('/repos/:owner/:repo/issues/:number', $this->getOwner(), |
|
211 | $this->getRepo(), $number), Request::METHOD_PATCH, [ |
|
212 | 'title' => $title, |
|
213 | 'body' => $body, |
|
214 | 'assignee' => $assignee, |
|
215 | 'milestone' => $milestone, |
|
216 | 'labels' => $labels |
|
217 | ]); |
|
218 | } |
|
219 | } |