diff options
Diffstat (limited to 'services/webhook/matrix.go')
-rw-r--r-- | services/webhook/matrix.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/services/webhook/matrix.go b/services/webhook/matrix.go index 59eae48307..6bbae70422 100644 --- a/services/webhook/matrix.go +++ b/services/webhook/matrix.go @@ -161,10 +161,10 @@ func (m *MatrixPayloadUnsafe) Release(p *api.ReleasePayload) (api.Payloader, err func (m *MatrixPayloadUnsafe) Push(p *api.PushPayload) (api.Payloader, error) { var commitDesc string - if len(p.Commits) == 1 { + if p.TotalCommits == 1 { commitDesc = "1 commit" } else { - commitDesc = fmt.Sprintf("%d commits", len(p.Commits)) + commitDesc = fmt.Sprintf("%d commits", p.TotalCommits) } repoLink := MatrixLinkFormatter(p.Repo.HTMLURL, p.Repo.FullName) |