diff options
author | John Olheiser <42128690+jolheiser@users.noreply.github.com> | 2019-12-16 18:28:19 -0600 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2019-12-17 08:28:19 +0800 |
commit | 1707f59966df7fa4375235dbf43326d382eeaf97 (patch) | |
tree | 425a66eebe2d947e89584de9aab5ddada5959d21 /modules/webhook/dingtalk.go | |
parent | 33662399d59a94436e6acb5e5bf41935dbc75328 (diff) | |
download | gitea-1707f59966df7fa4375235dbf43326d382eeaf97.tar.gz gitea-1707f59966df7fa4375235dbf43326d382eeaf97.zip |
Remove text from action-only webhooks (#9377)
* Remove text from contextual webhooks
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Missed one in Telegram
Signed-off-by: jolheiser <john.olheiser@gmail.com>
Diffstat (limited to 'modules/webhook/dingtalk.go')
-rw-r--r-- | modules/webhook/dingtalk.go | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/modules/webhook/dingtalk.go b/modules/webhook/dingtalk.go index b6d58f55cf..5ec8db9649 100644 --- a/modules/webhook/dingtalk.go +++ b/modules/webhook/dingtalk.go @@ -139,35 +139,26 @@ func getDingtalkIssuesPayload(p *api.IssuePayload) (*DingtalkPayload, error) { text = p.Issue.Body case api.HookIssueClosed: title = fmt.Sprintf("[%s] Issue closed: #%d %s", p.Repository.FullName, p.Index, p.Issue.Title) - text = p.Issue.Body case api.HookIssueReOpened: title = fmt.Sprintf("[%s] Issue re-opened: #%d %s", p.Repository.FullName, p.Index, p.Issue.Title) - text = p.Issue.Body case api.HookIssueEdited: title = fmt.Sprintf("[%s] Issue edited: #%d %s", p.Repository.FullName, p.Index, p.Issue.Title) text = p.Issue.Body case api.HookIssueAssigned: title = fmt.Sprintf("[%s] Issue assigned to %s: #%d %s", p.Repository.FullName, p.Issue.Assignee.UserName, p.Index, p.Issue.Title) - text = p.Issue.Body case api.HookIssueUnassigned: title = fmt.Sprintf("[%s] Issue unassigned: #%d %s", p.Repository.FullName, p.Index, p.Issue.Title) - text = p.Issue.Body case api.HookIssueLabelUpdated: title = fmt.Sprintf("[%s] Issue labels updated: #%d %s", p.Repository.FullName, p.Index, p.Issue.Title) - text = p.Issue.Body case api.HookIssueLabelCleared: title = fmt.Sprintf("[%s] Issue labels cleared: #%d %s", p.Repository.FullName, p.Index, p.Issue.Title) - text = p.Issue.Body case api.HookIssueSynchronized: title = fmt.Sprintf("[%s] Issue synchronized: #%d %s", p.Repository.FullName, p.Index, p.Issue.Title) - text = p.Issue.Body case api.HookIssueMilestoned: title = fmt.Sprintf("[%s] Issue milestone: #%d %s", p.Repository.FullName, p.Index, p.Issue.Title) - text = p.Issue.Body case api.HookIssueDemilestoned: title = fmt.Sprintf("[%s] Issue clear milestone: #%d %s", p.Repository.FullName, p.Index, p.Issue.Title) - text = p.Issue.Body } return &DingtalkPayload{ @@ -238,10 +229,8 @@ func getDingtalkPullRequestPayload(p *api.PullRequestPayload) (*DingtalkPayload, } else { title = fmt.Sprintf("[%s] Pull request closed: #%d %s", p.Repository.FullName, p.Index, p.PullRequest.Title) } - text = p.PullRequest.Body case api.HookIssueReOpened: title = fmt.Sprintf("[%s] Pull request re-opened: #%d %s", p.Repository.FullName, p.Index, p.PullRequest.Title) - text = p.PullRequest.Body case api.HookIssueEdited: title = fmt.Sprintf("[%s] Pull request edited: #%d %s", p.Repository.FullName, p.Index, p.PullRequest.Title) text = p.PullRequest.Body @@ -253,25 +242,18 @@ func getDingtalkPullRequestPayload(p *api.PullRequestPayload) (*DingtalkPayload, title = fmt.Sprintf("[%s] Pull request assigned to %s: #%d %s", p.Repository.FullName, strings.Join(list, ", "), p.Index, p.PullRequest.Title) - text = p.PullRequest.Body case api.HookIssueUnassigned: title = fmt.Sprintf("[%s] Pull request unassigned: #%d %s", p.Repository.FullName, p.Index, p.PullRequest.Title) - text = p.PullRequest.Body case api.HookIssueLabelUpdated: title = fmt.Sprintf("[%s] Pull request labels updated: #%d %s", p.Repository.FullName, p.Index, p.PullRequest.Title) - text = p.PullRequest.Body case api.HookIssueLabelCleared: title = fmt.Sprintf("[%s] Pull request labels cleared: #%d %s", p.Repository.FullName, p.Index, p.PullRequest.Title) - text = p.PullRequest.Body case api.HookIssueSynchronized: title = fmt.Sprintf("[%s] Pull request synchronized: #%d %s", p.Repository.FullName, p.Index, p.PullRequest.Title) - text = p.PullRequest.Body case api.HookIssueMilestoned: title = fmt.Sprintf("[%s] Pull request milestone: #%d %s", p.Repository.FullName, p.Index, p.PullRequest.Title) - text = p.PullRequest.Body 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 } return &DingtalkPayload{ |