diff options
author | Ben Bodenmiller <bbodenmiller@hotmail.com> | 2019-08-25 11:00:08 +0000 |
---|---|---|
committer | Ben Bodenmiller <bbodenmiller@hotmail.com> | 2019-08-25 11:00:08 +0000 |
commit | f2371a89f151da21e2d139f7cb159d611ba6fd0b (patch) | |
tree | 5692b4b958026565e4438063a522942d9da428eb /lib/api/labels.rb | |
parent | d90b361b7c8c1aa7faa9ef1ead40e096d4ae7e42 (diff) | |
parent | 8112fb37544557b3f94c0a558175d5da99ef9829 (diff) | |
download | gitlab-ce-docs-gitaly-path-fixes.tar.gz |
Merge branch 'master' into 'docs-gitaly-path-fixes'docs-gitaly-path-fixes
# Conflicts:
# doc/administration/gitaly/index.md
Diffstat (limited to 'lib/api/labels.rb')
-rw-r--r-- | lib/api/labels.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/api/labels.rb b/lib/api/labels.rb index c183198d3c6..83d645ca07a 100644 --- a/lib/api/labels.rb +++ b/lib/api/labels.rb @@ -38,11 +38,13 @@ module API success Entities::ProjectLabel end params do - requires :name, type: String, desc: 'The name of the label to be updated' + optional :label_id, type: Integer, desc: 'The id of the label to be updated' + optional :name, type: String, desc: 'The name of the label to be updated' optional :new_name, type: String, desc: 'The new name of the label' optional :color, type: String, desc: "The new color of the label given in 6-digit hex notation with leading '#' sign (e.g. #FFAABB) or one of the allowed CSS color names" optional :description, type: String, desc: 'The new description of label' optional :priority, type: Integer, desc: 'The priority of the label', allow_blank: true + exactly_one_of :label_id, :name at_least_one_of :new_name, :color, :description, :priority end put ':id/labels' do @@ -53,7 +55,9 @@ module API success Entities::ProjectLabel end params do - requires :name, type: String, desc: 'The name of the label to be deleted' + optional :label_id, type: Integer, desc: 'The id of the label to be deleted' + optional :name, type: String, desc: 'The name of the label to be deleted' + exactly_one_of :label_id, :name end delete ':id/labels' do delete_label(user_project) |