diff --git a/remote/gitea/helper.go b/remote/gitea/helper.go index 0b0a918a..e330545f 100644 --- a/remote/gitea/helper.go +++ b/remote/gitea/helper.go @@ -82,13 +82,18 @@ func buildFromPush(hook *pushHook) *model.Build { sender = hook.Sender.Login } + message := "" + if len(hook.Commits) > 0 { + message = hook.Commits[0].Message + } + return &model.Build{ Event: model.EventPush, Commit: hook.After, Ref: hook.Ref, Link: hook.Compare, Branch: strings.TrimPrefix(hook.Ref, "refs/heads/"), - Message: hook.Commits[0].Message, + Message: message, Avatar: avatar, Author: author, Email: hook.Sender.Email,