@@ 325-335 (lines=11) @@ | ||
322 | * |
|
323 | * @return mixed |
|
324 | */ |
|
325 | public function setLabel($issueIdOrKey, $label) |
|
326 | { |
|
327 | $labels = is_array($label) ? $label : [$label]; |
|
328 | ||
329 | $data['update']['labels'][]['set'] = $labels; |
|
330 | ||
331 | $result = $this->exec($this->uri . '/' . $issueIdOrKey, $data, Request::METHOD_PUT); |
|
332 | return $this->extractErrors($result, [204], function () use ($result) { |
|
333 | return $result; |
|
334 | }); |
|
335 | } |
|
336 | ||
337 | /** |
|
338 | * @param $issueIdOrKey |
|
@@ 343-353 (lines=11) @@ | ||
340 | * |
|
341 | * @return mixed |
|
342 | */ |
|
343 | public function removeLabel($issueIdOrKey, $label) |
|
344 | { |
|
345 | $labels = is_array($label) ? $label : [$label]; |
|
346 | ||
347 | $data['update']['labels'][]['remove'] = $labels; |
|
348 | ||
349 | $result = $this->exec($this->uri . '/' . $issueIdOrKey, $data, Request::METHOD_PUT); |
|
350 | return $this->extractErrors($result, [204], function () use ($result) { |
|
351 | return $result; |
|
352 | }); |
|
353 | } |
|
354 | } |
|
355 |