From f7cd394680f885061144d236abc3c25f30be3147 Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Thu, 17 Jun 2021 18:04:10 +0200 Subject: [API] Add repoCreateTag (#16165) * Add API CreateTag * Add Test * API: expose Tag Message --- modules/convert/convert.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'modules/convert/convert.go') diff --git a/modules/convert/convert.go b/modules/convert/convert.go index 109931dbc3..0b2135c580 100644 --- a/modules/convert/convert.go +++ b/modules/convert/convert.go @@ -8,6 +8,7 @@ package convert import ( "fmt" "strconv" + "strings" "time" "code.gitea.io/gitea/models" @@ -135,6 +136,7 @@ func ToBranchProtection(bp *models.ProtectedBranch) *api.BranchProtection { func ToTag(repo *models.Repository, t *git.Tag) *api.Tag { return &api.Tag{ Name: t.Name, + Message: strings.TrimSpace(t.Message), ID: t.ID.String(), Commit: ToCommitMeta(repo, t), ZipballURL: util.URLJoin(repo.HTMLURL(), "archive", t.Name+".zip"), -- cgit v1.2.3