diff options
Diffstat (limited to 'services/webhook/slack.go')
-rw-r--r-- | services/webhook/slack.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/services/webhook/slack.go b/services/webhook/slack.go index 63cc6f8ca2..f5c69d74b6 100644 --- a/services/webhook/slack.go +++ b/services/webhook/slack.go @@ -179,10 +179,10 @@ func (s *SlackPayload) Push(p *api.PushPayload) (api.Payloader, error) { commitString string ) - if len(p.Commits) == 1 { + if p.TotalCommits == 1 { commitDesc = "1 new commit" } else { - commitDesc = fmt.Sprintf("%d new commits", len(p.Commits)) + commitDesc = fmt.Sprintf("%d new commits", p.TotalCommits) } if len(p.CompareURL) > 0 { commitString = SlackLinkFormatter(p.CompareURL, commitDesc) |