diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-16 21:25:58 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-16 21:25:58 +0300 |
commit | a5f4bba440d7f9ea47046a0a561d49adf0a1e6d4 (patch) | |
tree | fb69158581673816a8cd895f9d352dcb3c678b1e /lib/api/helpers/label_helpers.rb | |
parent | d16b2e8639e99961de6ddc93909f3bb5c1445ba1 (diff) |
Add latest changes from gitlab-org/gitlab@14-0-stable-eev14.0.0-rc42
Diffstat (limited to 'lib/api/helpers/label_helpers.rb')
-rw-r--r-- | lib/api/helpers/label_helpers.rb | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/lib/api/helpers/label_helpers.rb b/lib/api/helpers/label_helpers.rb index 796b8928243..da0ee8f207e 100644 --- a/lib/api/helpers/label_helpers.rb +++ b/lib/api/helpers/label_helpers.rb @@ -5,34 +5,27 @@ module API module LabelHelpers extend Grape::API::Helpers - params :optional_label_params do - optional :description, type: String, desc: 'The description of the label' - optional :remove_on_close, type: Boolean, desc: 'Whether the label should be removed from an issue when the issue is closed' - end - params :label_create_params do requires :name, type: String, desc: 'The name of the label to be created' requires :color, type: String, desc: "The color of the label given in 6-digit hex notation with leading '#' sign (e.g. #FFAABB) or one of the allowed CSS color names" - - use :optional_label_params + optional :description, type: String, desc: 'The description of label to be created' end params :label_update_params do 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" - - use :optional_label_params + optional :description, type: String, desc: 'The new description of label' end params :project_label_update_params do use :label_update_params optional :priority, type: Integer, desc: 'The priority of the label', allow_blank: true - at_least_one_of :new_name, :color, :description, :priority, :remove_on_close + at_least_one_of :new_name, :color, :description, :priority end params :group_label_update_params do use :label_update_params - at_least_one_of :new_name, :color, :description, :remove_on_close + at_least_one_of :new_name, :color, :description end def find_label(parent, id_or_title, params = { include_ancestor_groups: true }) |