diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2018-10-15 11:52:52 +0800 |
---|---|---|
committer | Lauris BH <lauris@nix.lv> | 2018-10-15 06:52:52 +0300 |
commit | 970c690681f563054a0eb2f693f99584bebea754 (patch) | |
tree | 4e9120aeaa0dd32f83592b043adab4d6ff2d5db9 /models/release.go | |
parent | 0cd8cecdf82787fdb67b3b040c35eb9e8e1ba627 (diff) | |
download | gitea-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.go | 4 |
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. |