Commit b209eb12 authored by Valery Sizov's avatar Valery Sizov

resolve app/services/slash_commands/interpret_service.rb for CE->EE

parent cf684b4d
...@@ -92,15 +92,13 @@ module SlashCommands ...@@ -92,15 +92,13 @@ module SlashCommands
desc 'Assign' desc 'Assign'
explanation do |users| explanation do |users|
<<<<<<< HEAD ## EE-specific
users = issuable.is_a?(Issue) ? users : users.take(1) users = issuable.is_a?(Issue) ? users : users.take(1)
"Assigns #{users.map(&:to_reference).to_sentence}." "Assigns #{users.map(&:to_reference).to_sentence}."
end end
params do params do
## EE-specific
issuable.is_a?(Issue) ? '@user1 @user2' : '@user' issuable.is_a?(Issue) ? '@user1 @user2' : '@user'
=======
"Assigns #{users.first.to_reference}." if users.any?
>>>>>>> ce-com/master
end end
condition do condition do
current_user.can?(:"admin_#{issuable.to_ability_name}", project) current_user.can?(:"admin_#{issuable.to_ability_name}", project)
...@@ -112,12 +110,8 @@ module SlashCommands ...@@ -112,12 +110,8 @@ module SlashCommands
next if users.empty? next if users.empty?
if issuable.is_a?(Issue) if issuable.is_a?(Issue)
<<<<<<< HEAD
# EE specific. In CE we should replace one assignee with another # EE specific. In CE we should replace one assignee with another
@updates[:assignee_ids] = issuable.assignees.pluck(:id) + users.map(&:id) @updates[:assignee_ids] = issuable.assignees.pluck(:id) + users.map(&:id)
=======
@updates[:assignee_ids] = [users.last.id]
>>>>>>> ce-com/master
else else
@updates[:assignee_id] = users.last.id @updates[:assignee_id] = users.last.id
end end
......
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