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
e03ebd80
Commit
e03ebd80
authored
Nov 10, 2018
by
blackst0ne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix minor offenses
parent
079a7508
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
6 deletions
+2
-6
app/models/project_services/discord_service.rb
app/models/project_services/discord_service.rb
+1
-5
spec/models/project_services/discord_service_spec.rb
spec/models/project_services/discord_service_spec.rb
+1
-1
No files found.
app/models/project_services/discord_service.rb
View file @
e03ebd80
...
...
@@ -25,10 +25,6 @@ class DiscordService < ChatNotificationService
</ol>"
end
def
webhook_placeholder
"https://discordapp.com/api/webhooks/..."
end
def
event_field
(
event
)
# No-op.
end
...
...
@@ -39,7 +35,7 @@ class DiscordService < ChatNotificationService
def
default_fields
[
{
type:
"text"
,
name:
"webhook"
,
placeholder:
"e.g.
#{
webhook_placeholder
}
"
},
{
type:
"text"
,
name:
"webhook"
,
placeholder:
"e.g.
https://discordapp.com/api/webhooks/…
"
},
{
type:
"checkbox"
,
name:
"notify_only_broken_pipelines"
},
{
type:
"checkbox"
,
name:
"notify_only_default_branch"
}
]
...
...
spec/models/project_services/discord_service_spec.rb
View file @
e03ebd80
...
...
@@ -3,7 +3,7 @@
require
"spec_helper"
describe
DiscordService
do
it_behaves_like
"chat service"
,
"
Hangouts Chat
"
do
it_behaves_like
"chat service"
,
"
Discord notifications
"
do
let
(
:client
)
{
Discordrb
::
Webhooks
::
Client
}
let
(
:client_arguments
)
{
{
url:
webhook_url
}
}
let
(
:content_key
)
{
:content
}
...
...
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