summaryrefslogtreecommitdiffstats
path: root/services/webhook/telegram.go
diff options
context:
space:
mode:
Diffstat (limited to 'services/webhook/telegram.go')
-rw-r--r--services/webhook/telegram.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/services/webhook/telegram.go b/services/webhook/telegram.go
index 13471d864e..7ca5f61062 100644
--- a/services/webhook/telegram.go
+++ b/services/webhook/telegram.go
@@ -89,11 +89,11 @@ func (t *TelegramPayload) Push(p *api.PushPayload) (api.Payloader, error) {
)
var titleLink string
- if len(p.Commits) == 1 {
+ if p.TotalCommits == 1 {
commitDesc = "1 new commit"
titleLink = p.Commits[0].URL
} else {
- commitDesc = fmt.Sprintf("%d new commits", len(p.Commits))
+ commitDesc = fmt.Sprintf("%d new commits", p.TotalCommits)
titleLink = p.CompareURL
}
if titleLink == "" {