@@ -864,6 +864,17 @@ class GroupLabelManager(ListMixin, CreateMixin, UpdateMixin, DeleteMixin, RESTMa
864
864
_create_attrs = (("name" , "color" ), ("description" , "priority" ))
865
865
_update_attrs = (("name" ,), ("new_name" , "color" , "description" , "priority" ))
866
866
867
+ # Update without ID.
868
+ def update (self , name , new_data = {}, ** kwargs ):
869
+ """Update a Label on the server.
870
+
871
+ Args:
872
+ name: The name of the label
873
+ **kwargs: Extra options to send to the server (e.g. sudo)
874
+ """
875
+ new_data ["name" ] = name
876
+ super ().update (id = None , new_data = new_data , ** kwargs )
877
+
867
878
# Delete without ID.
868
879
@exc .on_http_error (exc .GitlabDeleteError )
869
880
def delete (self , name , ** kwargs ):
@@ -2982,6 +2993,17 @@ class ProjectLabelManager(
2982
2993
_create_attrs = (("name" , "color" ), ("description" , "priority" ))
2983
2994
_update_attrs = (("name" ,), ("new_name" , "color" , "description" , "priority" ))
2984
2995
2996
+ # Update without ID.
2997
+ def update (self , name , new_data = {}, ** kwargs ):
2998
+ """Update a Label on the server.
2999
+
3000
+ Args:
3001
+ name: The name of the label
3002
+ **kwargs: Extra options to send to the server (e.g. sudo)
3003
+ """
3004
+ new_data ["name" ] = name
3005
+ super ().update (id = None , new_data = new_data , ** kwargs )
3006
+
2985
3007
# Delete without ID.
2986
3008
@exc .on_http_error (exc .GitlabDeleteError )
2987
3009
def delete (self , name , ** kwargs ):
0 commit comments