Skip to content
This repository has been archived by the owner on Jun 8, 2019. It is now read-only.

Functions for releases #31

Merged
merged 1 commit into from
Dec 31, 2016
Merged

Functions for releases #31

merged 1 commit into from
Dec 31, 2016

Conversation

ethantkoenig
Copy link
Member

@ethantkoenig ethantkoenig commented Dec 27, 2016

Functions for the following endpoints:

  • GET /repos/:user/:repo/releases: List a repository's releases
  • GET /repos/:user/:repo/releases/:id: Get a release
  • POST /repos/:user/:repo/releases: Create a new release
  • PATCH /repos/:user/:repo/releases/:id: Edit a release
  • DELETE /repos/:user/:repo/releases/:id: Delete a release

See also go-gitea/gitea#510

Copy link
Member

@bkcsoft bkcsoft left a 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 :)

// Release represents a repository release
type Release struct {
ID int64 `json:"id"`
TagName string `json:"string"`
Copy link
Member

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"`
}
Copy link
Member

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

Copy link
Member Author

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.

ID int64 `json:"id"`
TagName string `json:"string"`
Target string `json:"target_commitish"`
Title string `json:"title"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be json:"name" :)

@ethantkoenig
Copy link
Member Author

@bkcsoft Updated

@tboerger
Copy link
Member

LGTM

@thibaultmeyer
Copy link

LGTM

@tboerger
Copy link
Member

@bkcsoft anything missing for you?

@bkcsoft
Copy link
Member

bkcsoft commented Dec 31, 2016

No, LGTM

@bkcsoft bkcsoft merged commit 5266f2b into go-gitea:master Dec 31, 2016
@ethantkoenig ethantkoenig deleted the releases branch December 31, 2016 16:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants