summaryrefslogtreecommitdiffstats
path: root/models/release.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2018-10-15 11:52:52 +0800
committerLauris BH <lauris@nix.lv>2018-10-15 06:52:52 +0300
commit970c690681f563054a0eb2f693f99584bebea754 (patch)
tree4e9120aeaa0dd32f83592b043adab4d6ff2d5db9 /models/release.go
parent0cd8cecdf82787fdb67b3b040c35eb9e8e1ba627 (diff)
downloadgitea-970c690681f563054a0eb2f693f99584bebea754.tar.gz
gitea-970c690681f563054a0eb2f693f99584bebea754.zip
fix release creation via API (#5076)
* fix release creation via API * fix release create tests
Diffstat (limited to 'models/release.go')
-rw-r--r--models/release.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/models/release.go b/models/release.go
index 1f03ed782d..44d028a26f 100644
--- a/models/release.go
+++ b/models/release.go
@@ -115,9 +115,9 @@ func createTag(gitRepo *git.Repository, rel *Release) error {
// Only actual create when publish.
if !rel.IsDraft {
if !gitRepo.IsTagExist(rel.TagName) {
- commit, err := gitRepo.GetBranchCommit(rel.Target)
+ commit, err := gitRepo.GetCommit(rel.Target)
if err != nil {
- return fmt.Errorf("GetBranchCommit: %v", err)
+ return fmt.Errorf("GetCommit: %v", err)
}
// Trim '--' prefix to prevent command line argument vulnerability.