BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
8ca5fef9
Unverified
Commit
8ca5fef9
authored
Dec 15, 2016
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use single presenter for everything
parent
37057870
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
14 deletions
+2
-14
chat_slash_commands_service.rb
app/models/project_services/chat_slash_commands_service.rb
+2
-6
mattermost_slash_commands_service.rb
...els/project_services/mattermost_slash_commands_service.rb
+0
-4
slack_slash_commands_service.rb
app/models/project_services/slack_slash_commands_service.rb
+0
-4
No files found.
app/models/project_services/chat_slash_commands_service.rb
View file @
8ca5fef9
...
...
@@ -33,10 +33,10 @@ class ChatSlashCommandsService < Service
user
=
find_chat_user
(
params
)
unless
user
url
=
authorize_chat_name_url
(
params
)
return
p
resenter
.
authorize_chat_name
(
url
)
return
Gitlab
::
ChatCommands
::
P
resenter
.
authorize_chat_name
(
url
)
end
Gitlab
::
ChatCommands
::
Command
.
new
(
pr
esenter
,
pr
oject
,
user
,
params
).
execute
Gitlab
::
ChatCommands
::
Command
.
new
(
project
,
user
,
params
).
execute
end
private
...
...
@@ -48,8 +48,4 @@ class ChatSlashCommandsService < Service
def
authorize_chat_name_url
(
params
)
ChatNames
::
AuthorizeUserService
.
new
(
self
,
params
).
execute
end
def
presenter
throw
NotImplementedError
end
end
app/models/project_services/mattermost_slash_commands_service.rb
View file @
8ca5fef9
...
...
@@ -18,8 +18,4 @@ class MattermostSlashCommandsService < ChatService
def
to_param
'mattermost_slash_commands'
end
def
presenter
Gitlab
::
ChatCommands
::
Presenters
::
Mattermost
.
new
end
end
app/models/project_services/slack_slash_commands_service.rb
View file @
8ca5fef9
...
...
@@ -12,8 +12,4 @@ class SlackSlashCommandsService < ChatSlashCommandsService
def
to_param
'slack_slash_commands'
end
def
presenter
Gitlab
::
ChatCommands
::
Presenters
::
Mattermost
.
new
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment