Skip to content

Added attachments to the releases API #2084

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 29 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
23f0728
Don't ignore gravatar error
ethantkoenig Jun 29, 2017
05e3726
Use default avatar on error
ethantkoenig Jun 29, 2017
2b410e4
lint
ethantkoenig Jun 29, 2017
49f5ddc
Added attachments to the releases API
stefan-lacatus Jun 29, 2017
935b40f
Merge pull request #2083 from ethantkoenig/check_err/org_avatar
andreynering Jun 30, 2017
789188f
Reduce number of layer (#2078)
Jun 30, 2017
b187b79
Revert changes done to vendor package gitea-sdk
stefan-lacatus Jun 30, 2017
8fd43f2
Revert "Reduce number of layer" (#2086)
lunny Jun 30, 2017
bfd3b7d
Added size of the attachment to the api format
stefan-lacatus Jun 30, 2017
270098c
Added two utility methods on attachment, to get an attachment by id a…
stefan-lacatus Jun 30, 2017
7e14752
Implemented the api for getting only the attachments of a release,
stefan-lacatus Jun 30, 2017
ba596d1
When searching for a release attachments, use the simpler method.
stefan-lacatus Jun 30, 2017
b23c0fa
Fix linting errors
stefan-lacatus Jun 30, 2017
36e1893
Fix more linting errors
stefan-lacatus Jun 30, 2017
a5ee8e1
Changed GetSize for attachment implementation.
stefan-lacatus Jun 30, 2017
b36849d
Fix exit status 1 not handled @ getMergeCommit
Bwko Jun 30, 2017
12cb6cd
Merge pull request #2087 from Bwko/fix_error_exit
lafriks Jun 30, 2017
78f201a
Implementation of `GET /repos/:owner/:repo/releases/latest`
stefan-lacatus Jun 30, 2017
31ab468
Added size of the attachment to the api format
stefan-lacatus Jun 30, 2017
9a74130
Added two utility methods on attachment, to get an attachment by id a…
stefan-lacatus Jun 30, 2017
377cf38
Implemented the api for getting only the attachments of a release,
stefan-lacatus Jun 30, 2017
c67b34d
When searching for a release attachments, use the simpler method.
stefan-lacatus Jun 30, 2017
3e72f55
Fix linting errors
stefan-lacatus Jun 30, 2017
ad3ba65
Fix more linting errors
stefan-lacatus Jun 30, 2017
6f6e21b
Changed GetSize for attachment implementation.
stefan-lacatus Jun 30, 2017
49b4cd7
Implementation of `GET /repos/:owner/:repo/releases/latest`
stefan-lacatus Jun 30, 2017
159c7f5
Rebase on top of master
stefan-lacatus Jun 30, 2017
6822f6f
Merge remote-tracking branch 'origin/master'
stefan-lacatus Jun 30, 2017
856d8ec
Fix incorrect check
stefan-lacatus Jul 5, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix more linting errors
Signed-off-by: Petrisor Lacatus <placatus@ptc.com>
  • Loading branch information
stefan-lacatus committed Jun 30, 2017
commit ad3ba65173645d73a62552a10040f4b655685eda
4 changes: 2 additions & 2 deletions routers/api/v1/repo/release.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func ListReleaseAttachments(ctx *context.APIContext) {
// GetReleaseAttachment get a single attachment of a release
func GetReleaseAttachment(ctx *context.APIContext) {
id := ctx.ParamsInt64(":id")
attachmentId := ctx.ParamsInt64(":assetId")
attachmentID := ctx.ParamsInt64(":assetId")
release, err := models.GetReleaseByID(id)
if err != nil {
ctx.Error(500, "GetReleaseByID", err)
Expand All @@ -72,7 +72,7 @@ func GetReleaseAttachment(ctx *context.APIContext) {
return
}
// load the attachments of this release
attachment, err := models.GetAttachmentByID(attachmentId)
attachment, err := models.GetAttachmentByID(attachmentID)
// if the attachment was not found, or it was found but is not associated with this release, then throw 404
if err != nil || id != attachment.ReleaseID {
ctx.Status(404)
Expand Down