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
Léo-Paul Géneau
gitlab-ce
Commits
4b7395e0
Commit
4b7395e0
authored
Dec 22, 2016
by
Z.J. van de Weg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix format of Slack when result is nil
parent
6d9c1d3e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
app/models/project_services/slack_slash_commands_service.rb
app/models/project_services/slack_slash_commands_service.rb
+1
-1
spec/models/project_services/slack_slash_commands_service_spec.rb
...els/project_services/slack_slash_commands_service_spec.rb
+2
-1
No files found.
app/models/project_services/slack_slash_commands_service.rb
View file @
4b7395e0
...
@@ -16,7 +16,7 @@ class SlackSlashCommandsService < ChatSlashCommandsService
...
@@ -16,7 +16,7 @@ class SlackSlashCommandsService < ChatSlashCommandsService
def
trigger
(
params
)
def
trigger
(
params
)
# Format messages to be Slack-compatible
# Format messages to be Slack-compatible
super
.
tap
do
|
result
|
super
.
tap
do
|
result
|
result
[
:text
]
=
format
(
result
[
:text
])
result
[
:text
]
=
format
(
result
[
:text
])
if
result
.
is_a?
(
Hash
)
end
end
end
end
...
...
spec/models/project_services/slack_slash_commands_service.rb
→
spec/models/project_services/slack_slash_commands_service
_spec
.rb
View file @
4b7395e0
...
@@ -18,7 +18,8 @@ describe SlackSlashCommandsService, :models do
...
@@ -18,7 +18,8 @@ describe SlackSlashCommandsService, :models do
let
(
:service
)
do
let
(
:service
)
do
project
.
create_slack_slash_commands_service
(
project
.
create_slack_slash_commands_service
(
properties:
{
token:
'token'
}
properties:
{
token:
'token'
},
active:
true
)
)
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