summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2016-12-19 15:40:06 +0100
committerKamil Trzcinski <ayufan@ayufan.eu>2016-12-19 15:40:06 +0100
commit298d05a5c3cc3c2f1daa4d77c45f9c90b53248df (patch)
tree0ae700b4b685ae9145e3c65a9cc379f1d9bdec6e /lib
parentb1ccf99e87605216f7d5733d6a4ffb4530d4cfc9 (diff)
downloadgitlab-ce-298d05a5c3cc3c2f1daa4d77c45f9c90b53248df.tar.gz
Improve after feedback
Diffstat (limited to 'lib')
-rw-r--r--lib/api/services.rb9
-rw-r--r--lib/gitlab/chat_commands/help.rb28
-rw-r--r--lib/gitlab/chat_commands/presenter.rb2
3 files changed, 9 insertions, 30 deletions
diff --git a/lib/api/services.rb b/lib/api/services.rb
index 59232c84c24..aa97f6af0b2 100644
--- a/lib/api/services.rb
+++ b/lib/api/services.rb
@@ -378,7 +378,6 @@ module API
desc: 'A custom certificate authority bundle to verify the Kubernetes cluster with (PEM format)'
},
],
-
'mattermost-slash-commands' => [
{
required: true,
@@ -387,6 +386,14 @@ module API
desc: 'The Mattermost token'
}
],
+ 'slack-slash-commands' => [
+ {
+ required: true,
+ name: :token,
+ type: String,
+ desc: 'The Slack token'
+ }
+ ],
'pipelines-email' => [
{
required: true,
diff --git a/lib/gitlab/chat_commands/help.rb b/lib/gitlab/chat_commands/help.rb
deleted file mode 100644
index e76733f5445..00000000000
--- a/lib/gitlab/chat_commands/help.rb
+++ /dev/null
@@ -1,28 +0,0 @@
-module Gitlab
- module ChatCommands
- class Help < BaseCommand
- # This class has to be used last, as it always matches. It has to match
- # because other commands were not triggered and we want to show the help
- # command
- def self.match(_text)
- true
- end
-
- def self.help_message
- 'help'
- end
-
- def self.allowed?(_project, _user)
- true
- end
-
- def execute(commands)
- Gitlab::ChatCommands::Presenters::Help.new(commands).present(trigger)
- end
-
- def trigger
- params[:command]
- end
- end
- end
-end
diff --git a/lib/gitlab/chat_commands/presenter.rb b/lib/gitlab/chat_commands/presenter.rb
index b4c4dc252ca..caceaa25391 100644
--- a/lib/gitlab/chat_commands/presenter.rb
+++ b/lib/gitlab/chat_commands/presenter.rb
@@ -1,7 +1,7 @@
module Gitlab
module ChatCommands
class Presenter
- include Gitlab::Routing.url_helpers
+ include Gitlab::Routing
def authorize_chat_name(url)
message = if url