diff options
Diffstat (limited to 'services/webhook/msteams.go')
-rw-r--r-- | services/webhook/msteams.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/services/webhook/msteams.go b/services/webhook/msteams.go index f58da3fe1c..37810b4cd3 100644 --- a/services/webhook/msteams.go +++ b/services/webhook/msteams.go @@ -316,11 +316,12 @@ func GetMSTeamsPayload(p api.Payloader, event webhook_module.HookEventType, _ st } func createMSTeamsPayload(r *api.Repository, s *api.User, title, text, actionTarget string, color int, fact *MSTeamsFact) *MSTeamsPayload { - facts := []MSTeamsFact{ - { + facts := make([]MSTeamsFact, 0, 2) + if r != nil { + facts = append(facts, MSTeamsFact{ Name: "Repository:", Value: r.FullName, - }, + }) } if fact != nil { facts = append(facts, *fact) |