From 253fdfb7fab565172e150cc1ca2ac2701fa744c7 Mon Sep 17 00:00:00 2001 From: zeripath Date: Tue, 12 Nov 2019 23:49:40 +0000 Subject: [PATCH] Fix Notify Create Ref Error on tag creation (#8936) * Fix Notify Create Ref Error on tag creation * Just use the provided full ref instead of BranchCommit --- modules/notification/webhook/webhook.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/notification/webhook/webhook.go b/modules/notification/webhook/webhook.go index 8059ec1c0..27afbba7a 100644 --- a/modules/notification/webhook/webhook.go +++ b/modules/notification/webhook/webhook.go @@ -573,9 +573,9 @@ func (m *webhookNotifier) NotifyCreateRef(pusher *models.User, repo *models.Repo return } - shaSum, err := gitRepo.GetBranchCommitID(refName) + shaSum, err := gitRepo.GetRefCommitID(refFullName) if err != nil { - log.Error("GetBranchCommitID[%s]: %v", refFullName, err) + log.Error("GetRefCommitID[%s]: %v", refFullName, err) return }