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, TagName: r.TagName,
Target: r.Target, Target: r.Target,
Title: r.Title, Title: r.Title,
Sha1: r.Sha1,
Note: r.Note, Note: r.Note,
URL: r.APIURL(), URL: r.APIURL(),
HTMLURL: r.HTMLURL(), HTMLURL: r.HTMLURL(),

View File

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

View File

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