Merge pull request '添加发行版的提交id字段' (#29) from wonderful/gitea-1156:develop into develop

This commit is contained in:
yystopf 2021-12-07 15:47:40 +08:00
commit e8d16c60fd
3 changed files with 6 additions and 0 deletions

View File

@ -20,6 +20,7 @@ func ToRelease(r *models.Release) *api.Release {
TagName: r.TagName,
Target: r.Target,
Title: r.Title,
Sha1: r.Sha1,
Note: r.Note,
URL: r.APIURL(),
HTMLURL: r.HTMLURL(),

View File

@ -27,6 +27,7 @@ type Release struct {
PublishedAt time.Time `json:"published_at"`
Publisher *User `json:"author"`
Attachments []*Attachment `json:"assets"`
Sha1 string `json:"sha"`
}
// CreateReleaseOption options when creating a release

View File

@ -17189,6 +17189,10 @@
"format": "date-time",
"x-go-name": "PublishedAt"
},
"sha": {
"type": "string",
"x-go-name": "Sha1"
},
"tag_name": {
"type": "string",
"x-go-name": "TagName"