Commit 42a29c06 authored by Toon Claes's avatar Toon Claes

Move /reassign slash command to EE subfolder

The /reassign slash command only is used in EE, so move it outside the shared
code to avoid merge conflicts.
parent c193af79
...@@ -23,6 +23,8 @@ module Issuable ...@@ -23,6 +23,8 @@ module Issuable
IssuableMeta = Struct.new(:upvotes, :downvotes, :notes_count, :merge_requests_count) IssuableMeta = Struct.new(:upvotes, :downvotes, :notes_count, :merge_requests_count)
included do included do
prepend EE::Issuable
cache_markdown_field :title, pipeline: :single_line cache_markdown_field :title, pipeline: :single_line
cache_markdown_field :description, issuable_state_filter_enabled: true cache_markdown_field :description, issuable_state_filter_enabled: true
......
module EE
module SlashCommands
module InterpretService
include ::Gitlab::SlashCommands::Dsl
desc 'Change assignee(s)'
explanation do
'Change assignee(s)'
end
params '@user1 @user2'
condition do
issuable.allows_multiple_assignees? &&
issuable.persisted? &&
issuable.assignees.any? &&
current_user.can?(:"admin_#{issuable.to_ability_name}", project)
end
command :reassign do |unassign_param|
@updates[:assignee_ids] = extract_users(unassign_param).map(&:id)
end
end
end
end
...@@ -150,21 +150,6 @@ module QuickActions ...@@ -150,21 +150,6 @@ module QuickActions
end end
end end
desc 'Change assignee(s)'
explanation do
'Change assignee(s)'
end
params '@user1 @user2'
condition do
issuable.allows_multiple_assignees? &&
issuable.persisted? &&
issuable.assignees.any? &&
current_user.can?(:"admin_#{issuable.to_ability_name}", project)
end
command :reassign do |unassign_param|
@updates[:assignee_ids] = extract_users(unassign_param).map(&:id)
end
desc 'Set milestone' desc 'Set milestone'
explanation do |milestone| explanation do |milestone|
"Sets the milestone to #{milestone.to_reference}." if milestone "Sets the milestone to #{milestone.to_reference}." if milestone
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment