summaryrefslogtreecommitdiff
path: root/lib/api/helpers/label_helpers.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/helpers/label_helpers.rb')
-rw-r--r--lib/api/helpers/label_helpers.rb15
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 })