aboutsummaryrefslogtreecommitdiffstats
path: root/models/webhook_discord.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/webhook_discord.go')
-rw-r--r--models/webhook_discord.go24
1 files changed, 24 insertions, 0 deletions
diff --git a/models/webhook_discord.go b/models/webhook_discord.go
index 04ebbc293f..95fca2ee6f 100644
--- a/models/webhook_discord.go
+++ b/models/webhook_discord.go
@@ -251,6 +251,14 @@ func getDiscordIssuesPayload(p *api.IssuePayload, meta *DiscordMeta) (*DiscordPa
title = fmt.Sprintf("[%s] Issue synchronized: #%d %s", p.Repository.FullName, p.Index, p.Issue.Title)
text = p.Issue.Body
color = warnColor
+ case api.HookIssueMilestoned:
+ title = fmt.Sprintf("[%s] Issue milestone: #%d %s", p.Repository.FullName, p.Index, p.Issue.Title)
+ text = p.Issue.Body
+ color = warnColor
+ case api.HookIssueDemilestoned:
+ title = fmt.Sprintf("[%s] Issue clear milestone: #%d %s", p.Repository.FullName, p.Index, p.Issue.Title)
+ text = p.Issue.Body
+ color = warnColor
}
return &DiscordPayload{
@@ -362,6 +370,14 @@ func getDiscordPullRequestPayload(p *api.PullRequestPayload, meta *DiscordMeta)
title = fmt.Sprintf("[%s] Pull request synchronized: #%d %s", p.Repository.FullName, p.Index, p.PullRequest.Title)
text = p.PullRequest.Body
color = warnColor
+ case api.HookIssueMilestoned:
+ title = fmt.Sprintf("[%s] Pull request milestone: #%d %s", p.Repository.FullName, p.Index, p.PullRequest.Title)
+ text = p.PullRequest.Body
+ color = warnColor
+ case api.HookIssueDemilestoned:
+ title = fmt.Sprintf("[%s] Pull request clear milestone: #%d %s", p.Repository.FullName, p.Index, p.PullRequest.Title)
+ text = p.PullRequest.Body
+ color = warnColor
}
return &DiscordPayload{
@@ -422,6 +438,14 @@ func getDiscordReleasePayload(p *api.ReleasePayload, meta *DiscordMeta) (*Discor
title = fmt.Sprintf("[%s] Release created", p.Release.TagName)
url = p.Release.URL
color = successColor
+ case api.HookReleaseUpdated:
+ title = fmt.Sprintf("[%s] Release updated", p.Release.TagName)
+ url = p.Release.URL
+ color = successColor
+ case api.HookReleaseDeleted:
+ title = fmt.Sprintf("[%s] Release deleted", p.Release.TagName)
+ url = p.Release.URL
+ color = successColor
}
return &DiscordPayload{