diff options
author | 6543 <6543@obermui.de> | 2021-06-17 18:04:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-17 18:04:10 +0200 |
commit | f7cd394680f885061144d236abc3c25f30be3147 (patch) | |
tree | b0cceab982c18db7fb48489729dc44fdff8101af /modules/convert/convert.go | |
parent | Speed up git diff highlight generation (#16180) (diff) | |
download | forgejo-f7cd394680f885061144d236abc3c25f30be3147.tar.xz forgejo-f7cd394680f885061144d236abc3c25f30be3147.zip |
[API] Add repoCreateTag (#16165)
* Add API CreateTag
* Add Test
* API: expose Tag Message
Diffstat (limited to 'modules/convert/convert.go')
-rw-r--r-- | modules/convert/convert.go | 2 |
1 files changed, 2 insertions, 0 deletions
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"), |