summaryrefslogtreecommitdiff
path: root/app/services/slash_commands
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2016-08-17 18:58:44 -0500
committerDouwe Maan <douwe@selenight.nl>2016-08-17 18:58:44 -0500
commit3e7eeefc939f2ce5234e36684c00b8d1c7e1c7dc (patch)
tree203850462714f28ae4d88654d48bd2ac759f9967 /app/services/slash_commands
parent8b8a4626c601a13683599fd1a127e2c502af38a3 (diff)
downloadgitlab-ce-3e7eeefc939f2ce5234e36684c00b8d1c7e1c7dc.tar.gz
Address feedback
Diffstat (limited to 'app/services/slash_commands')
-rw-r--r--app/services/slash_commands/interpret_service.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/app/services/slash_commands/interpret_service.rb b/app/services/slash_commands/interpret_service.rb
index cb0dca94036..dc4a892b8b1 100644
--- a/app/services/slash_commands/interpret_service.rb
+++ b/app/services/slash_commands/interpret_service.rb
@@ -18,11 +18,11 @@ module SlashCommands
content, commands = extractor.extract_commands(content, opts)
- commands.each do |name, *args|
+ commands.each do |name, args|
definition = self.class.command_definitions_by_name[name.to_sym]
next unless definition
- definition.execute(self, opts, *args)
+ definition.execute(self, opts, args)
end
[content, @updates]
@@ -76,7 +76,6 @@ module SlashCommands
command :assign do |assignee_param|
user = extract_references(assignee_param, :user).first
user ||= User.find_by(username: assignee_param)
- user ||= User.find_by(name: assignee_param)
@updates[:assignee_id] = user.id if user
end