]> source.dussan.org Git - gitea.git/commitdiff
Fix Notify Create Ref Error on tag creation (#8936)
authorzeripath <art27@cantab.net>
Tue, 12 Nov 2019 23:49:40 +0000 (23:49 +0000)
committerAntoine GIRARD <sapk@users.noreply.github.com>
Tue, 12 Nov 2019 23:49:40 +0000 (00:49 +0100)
* Fix Notify Create Ref Error on tag creation

* Just use the provided full ref instead of BranchCommit

modules/notification/webhook/webhook.go

index 8059ec1c00f89d5391da1cfcb4dc91ec980856cc..27afbba7ab81e962829789a3cda7e6de3afb9367 100644 (file)
@@ -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
        }