Fix minor offenses
This commit is contained in:
parent
079a75088e
commit
e03ebd80bb
|
@ -25,10 +25,6 @@ class DiscordService < ChatNotificationService
|
||||||
</ol>"
|
</ol>"
|
||||||
end
|
end
|
||||||
|
|
||||||
def webhook_placeholder
|
|
||||||
"https://discordapp.com/api/webhooks/..."
|
|
||||||
end
|
|
||||||
|
|
||||||
def event_field(event)
|
def event_field(event)
|
||||||
# No-op.
|
# No-op.
|
||||||
end
|
end
|
||||||
|
@ -39,7 +35,7 @@ class DiscordService < ChatNotificationService
|
||||||
|
|
||||||
def default_fields
|
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_broken_pipelines" },
|
||||||
{ type: "checkbox", name: "notify_only_default_branch" }
|
{ type: "checkbox", name: "notify_only_default_branch" }
|
||||||
]
|
]
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
require "spec_helper"
|
require "spec_helper"
|
||||||
|
|
||||||
describe DiscordService do
|
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) { Discordrb::Webhooks::Client }
|
||||||
let(:client_arguments) { { url: webhook_url } }
|
let(:client_arguments) { { url: webhook_url } }
|
||||||
let(:content_key) { :content }
|
let(:content_key) { :content }
|
||||||
|
|
Loading…
Reference in New Issue