Skip to content

Commit 1dcd825

Browse files
committed
fix typo and unnecessary color values
1 parent 74ef25b commit 1dcd825

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

models/webhook_discord.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,15 @@ func color(clr string) int {
7272
}
7373

7474
var (
75-
successColor = color("#1ac600")
76-
warnColor = color("#ffd930")
77-
failedColor = color("#ff3232")
75+
successColor = color("1ac600")
76+
warnColor = color("ffd930")
77+
failedColor = color("ff3232")
7878
)
7979

80-
// SetSecret sets the slack secret
80+
// SetSecret sets the discord secret
8181
func (p *DiscordPayload) SetSecret(_ string) {}
8282

83-
// JSONPayload Marshals the SlackPayload to json
83+
// JSONPayload Marshals the DiscordPayload to json
8484
func (p *DiscordPayload) JSONPayload() ([]byte, error) {
8585
data, err := json.MarshalIndent(p, "", " ")
8686
if err != nil {
@@ -231,13 +231,13 @@ func getDiscordPullRequestPayload(p *api.PullRequestPayload, meta *DiscordMeta)
231231
}, nil
232232
}
233233

234-
// GetDiscordPayload converts a slack webhook into a SlackPayload
234+
// GetDiscordPayload converts a discord webhook into a DiscordPayload
235235
func GetDiscordPayload(p api.Payloader, event HookEventType, meta string) (*DiscordPayload, error) {
236236
s := new(DiscordPayload)
237237

238238
discord := &DiscordMeta{}
239239
if err := json.Unmarshal([]byte(meta), &discord); err != nil {
240-
return s, errors.New("GetSlackPayload meta json:" + err.Error())
240+
return s, errors.New("GetDiscordPayload meta json:" + err.Error())
241241
}
242242

243243
switch event {

0 commit comments

Comments
 (0)