-
Notifications
You must be signed in to change notification settings - Fork 51
Functions for releases #31
Conversation
bkcsoft
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same for CreateReleaseOption and EditReleaseOption :)
gitea/releases.go
Outdated
| // Release represents a repository release | ||
| type Release struct { | ||
| ID int64 `json:"id"` | ||
| TagName string `json:"string"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be json:"tag_name" according to https://developer.github.com/v3/repos/releases/
| IsPrerelease bool `json:"prerelease"` | ||
| Created time.Time `json:"created"` | ||
| Publisher *User `json:"author"` | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing TarBall, ZipBall, all *URL, Name, PublishedAt :)
https://developer.github.com/v3/repos/releases/#response
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added url, tarball_url, zipball_url, name, and published_at. I did not add html_url, assets_url, or upload_url, since they don't currently apply to Gitea.
gitea/releases.go
Outdated
| ID int64 `json:"id"` | ||
| TagName string `json:"string"` | ||
| Target string `json:"target_commitish"` | ||
| Title string `json:"title"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be json:"name" :)
6799cad to
f672f53
Compare
f672f53 to
90d9b14
Compare
|
@bkcsoft Updated |
|
LGTM |
|
LGTM |
|
@bkcsoft anything missing for you? |
|
No, LGTM |
Functions for the following endpoints:
GET /repos/:user/:repo/releases: List a repository's releasesGET /repos/:user/:repo/releases/:id: Get a releasePOST /repos/:user/:repo/releases: Create a new releasePATCH /repos/:user/:repo/releases/:id: Edit a releaseDELETE /repos/:user/:repo/releases/:id: Delete a releaseSee also go-gitea/gitea#510