File tree Expand file tree Collapse file tree 3 files changed +14
-15
lines changed Expand file tree Collapse file tree 3 files changed +14
-15
lines changed Original file line number Diff line number Diff line change @@ -9,8 +9,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
9
9
10
10
* Removed models API
11
11
* Dropped support for PHP 7.1
12
+ * Updated to latest labels API
12
13
13
- [ 11.0.0-RC1 ] : https://github.com/GitLabPHP/Client/compare/10.3 .0...11.0.0-RC1
14
+ [ 11.0.0-RC1 ] : https://github.com/GitLabPHP/Client/compare/10.4 .0...11.0.0-RC1
14
15
15
16
## [ 10.4.0] - UPCOMING
16
17
Original file line number Diff line number Diff line change @@ -312,26 +312,25 @@ public function addLabel($group_id, array $params)
312
312
313
313
/**
314
314
* @param int|string $group_id
315
+ * @param int $label_id
315
316
* @param array $params
316
317
*
317
318
* @return mixed
318
319
*/
319
- public function updateLabel ($ group_id , array $ params )
320
+ public function updateLabel ($ group_id , int $ label_id , array $ params )
320
321
{
321
- return $ this ->put ('groups/ ' .self ::encodePath ($ group_id ).'/labels ' , $ params );
322
+ return $ this ->put ('groups/ ' .self ::encodePath ($ group_id ).'/labels/ ' . self :: encodePath ( $ label_id ) , $ params );
322
323
}
323
324
324
325
/**
325
326
* @param int|string $group_id
326
- * @param string $name
327
+ * @param int $label_id
327
328
*
328
329
* @return mixed
329
330
*/
330
- public function removeLabel ($ group_id, string $ name )
331
+ public function removeLabel ($ group_id', int $ label_id )
331
332
{
332
- return $ this ->delete ('groups/ ' .self ::encodePath ($ group_id ).'/labels ' , [
333
- 'name ' => $ name ,
334
- ]);
333
+ return $ this ->delete ('groups/ ' .self ::encodePath ($ group_id ).'/labels/ ' .self ::encodePath ($ label_id ));
335
334
}
336
335
337
336
/**
Original file line number Diff line number Diff line change @@ -711,26 +711,25 @@ public function addLabel($project_id, array $parameters)
711
711
712
712
/**
713
713
* @param int|string $project_id
714
+ * @param int $label_id
714
715
* @param array $parameters
715
716
*
716
717
* @return mixed
717
718
*/
718
- public function updateLabel ($ project_id , array $ parameters )
719
+ public function updateLabel ($ project_id , int $ label_id , array $ parameters )
719
720
{
720
- return $ this ->put ($ this ->getProjectPath ($ project_id , 'labels ' ), $ parameters );
721
+ return $ this ->put ($ this ->getProjectPath ($ project_id , 'labels/ ' . self :: encodePath ( $ label_id ) ), $ parameters );
721
722
}
722
723
723
724
/**
724
725
* @param int|string $project_id
725
- * @param string $name
726
+ * @param int $label_id
726
727
*
727
728
* @return mixed
728
729
*/
729
- public function removeLabel ($ project_id , string $ name )
730
+ public function removeLabel ($ project_id , int $ label_id )
730
731
{
731
- return $ this ->delete ($ this ->getProjectPath ($ project_id , 'labels ' ), [
732
- 'name ' => $ name ,
733
- ]);
732
+ return $ this ->delete ($ this ->getProjectPath ($ project_id , 'labels/ ' .self ::encodePath ($ label_id )));
734
733
}
735
734
736
735
/**
You can’t perform that action at this time.
0 commit comments