add:release's sha

This commit is contained in:
hang 2021-12-07 15:45:13 +08:00
parent 876a08fe06
commit cafbcb681a
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"