Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
2393d30d
Commit
2393d30d
authored
Dec 20, 2016
by
Z.J. van de Weg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix rubocop errors [ci skip]
parent
e9c14918
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
5 deletions
+4
-5
app/models/project_services/mattermost_slash_commands_service.rb
...els/project_services/mattermost_slash_commands_service.rb
+3
-3
lib/mattermost/client.rb
lib/mattermost/client.rb
+1
-1
spec/features/projects/services/mattermost_slash_command_spec.rb
...atures/projects/services/mattermost_slash_command_spec.rb
+0
-1
No files found.
app/models/project_services/mattermost_slash_commands_service.rb
View file @
2393d30d
...
...
@@ -24,13 +24,13 @@ class MattermostSlashCommandsService < ChatSlashCommandsService
create
(
command
(
params
))
update
(
active:
true
,
token:
token
)
if
token
rescue
=>
Mattermost
::
Error
=>
e
false
,
e
.
message
rescue
Mattermost
::
Error
=>
e
[
false
,
e
.
message
]
end
def
list_teams
(
user
)
Mattermost
::
Team
.
new
(
user
).
all
rescue
=>
Mattermost
::
Error
=>
e
rescue
Mattermost
::
Error
[]
end
...
...
lib/mattermost/client.rb
View file @
2393d30d
...
...
@@ -34,7 +34,7 @@ module Mattermost
end
json_response
rescue
JSON
::
JSONError
=>
e
rescue
JSON
::
JSONError
raise
ClientError
(
'Cannot parse response'
)
end
end
...
...
spec/features/projects/services/mattermost_slash_command_spec.rb
View file @
2393d30d
...
...
@@ -41,7 +41,6 @@ feature 'Setup Mattermost slash commands', feature: true do
end
end
describe
'mattermost service is not enabled'
do
before
do
allow
(
Gitlab
.
config
.
mattermost
).
to
receive
(
:enabled
).
and_return
(
false
)
...
...
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