[API] GetRelease by tag only return release #14397

Merged
cameronbraid merged 6 commits from pr-2edf7af9-56b4-48f6-ace2-decb1a5eaa3b into master 2021-02-04 03:12:26 +00:00
cameronbraid commented 2021-01-19 05:04:04 +00:00 (Migrated from github.com)

get release by tag should filter out tag releases to be consistent with list releases and get by id

There is a inconsistency between the 'list releases for repo' and 'get release by tag'.

The former filters out any release that is_tag=true where as the later includes them.

So there is no consistent way to identify if a release exists for a given tag name.

If I iterate the 'list releases for repo' results it wont be there. If I use 'get release by tag' it will be there but won't have any fields like title/notes/commitssh

get release by tag should filter out tag releases to be consistent with list releases and get by id There is a inconsistency between the 'list releases for repo' and 'get release by tag'. The former filters out any release that is_tag=true where as the later includes them. So there is no consistent way to identify if a release exists for a given tag name. If I iterate the 'list releases for repo' results it wont be there. If I use 'get release by tag' it will be there but won't have any fields like title/notes/commitssh
lafriks (Migrated from github.com) reviewed 2021-01-19 05:08:49 +00:00
@ -52,3 +51,4 @@
ctx.NotFound()
return
}
ctx.Error(http.StatusInternalServerError, "GetRelease", err)
lafriks (Migrated from github.com) commented 2021-01-19 05:08:49 +00:00

I don't think it's needed to check repoid

I don't think it's needed to check repoid
cameronbraid (Migrated from github.com) reviewed 2021-01-19 05:16:22 +00:00
@ -52,3 +51,4 @@
ctx.NotFound()
return
}
ctx.Error(http.StatusInternalServerError, "GetRelease", err)
cameronbraid (Migrated from github.com) commented 2021-01-19 05:16:22 +00:00

Sure, i've removed that test

Sure, i've removed that test
lafriks (Migrated from github.com) approved these changes 2021-01-19 05:17:52 +00:00
a1012112796 (Migrated from github.com) approved these changes 2021-01-19 07:14:26 +00:00
6543 (Migrated from github.com) requested changes 2021-01-20 00:48:05 +00:00
6543 (Migrated from github.com) left a comment

this is a breaking change!
and should at first be considdered carefully!

this is a breaking change! and should at first be considdered carefully!
6543 (Migrated from github.com) reviewed 2021-01-20 00:52:14 +00:00
@ -52,3 +51,4 @@
ctx.NotFound()
return
}
ctx.Error(http.StatusInternalServerError, "GetRelease", err)
6543 (Migrated from github.com) commented 2021-01-20 00:52:14 +00:00

this is already checked!!! (at L48)

the only new thing is the release.IsTag check ... witch will break things

If we are going this way, we have to invent a new endpoint for git tags only

this is already checked!!! (at L48) the only new thing is the `release.IsTag` check ... witch will break things If we are going this way, we have to invent a new endpoint for git tags only
6543 (Migrated from github.com) approved these changes 2021-02-04 02:00:44 +00:00
This repo is archived. You cannot comment on pull requests.
No Milestone
No project
No Assignees
1 Participants
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: lunny/gitea#14397
No description provided.