summaryrefslogtreecommitdiffstats
path: root/services/webhook/msteams.go
diff options
context:
space:
mode:
Diffstat (limited to 'services/webhook/msteams.go')
-rw-r--r--services/webhook/msteams.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/services/webhook/msteams.go b/services/webhook/msteams.go
index 1406004781..bf9e95edc5 100644
--- a/services/webhook/msteams.go
+++ b/services/webhook/msteams.go
@@ -125,11 +125,11 @@ func (m *MSTeamsPayload) 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 == "" {
@@ -156,7 +156,7 @@ func (m *MSTeamsPayload) Push(p *api.PushPayload) (api.Payloader, error) {
text,
titleLink,
greenColor,
- &MSTeamsFact{"Commit count:", fmt.Sprintf("%d", len(p.Commits))},
+ &MSTeamsFact{"Commit count:", fmt.Sprintf("%d", p.TotalCommits)},
), nil
}