]> source.dussan.org Git - gitea.git/commit
Display total commit count in hook message (#21400)
authorKN4CK3R <admin@oldschoolhack.me>
Sun, 16 Oct 2022 16:22:34 +0000 (18:22 +0200)
committerGitHub <noreply@github.com>
Sun, 16 Oct 2022 16:22:34 +0000 (00:22 +0800)
commitcad9adeff41595ea32281dbc2918e653c3e3a839
treea62bf796f12655c85323ded8922c6ea1d5e256ed
parent6f48a36227b7427afd2020aa416afe49d4c81015
Display total commit count in hook message (#21400)

Fixes #21379

The commits are capped by `setting.UI.FeedMaxCommitNum` so
`len(commits)` is not the correct number. So this PR adds a new
`TotalCommits` field.

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
13 files changed:
modules/notification/webhook/webhook.go
modules/structs/hook.go
routers/api/v1/repo/hook.go
routers/web/repo/webhook.go
services/webhook/dingtalk.go
services/webhook/dingtalk_test.go
services/webhook/discord.go
services/webhook/general_test.go
services/webhook/matrix.go
services/webhook/msteams.go
services/webhook/slack.go
services/webhook/telegram.go
services/webhook/wechatwork.go