-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
[API] GetRelease by tag only return release #14397
[API] GetRelease by tag only return release #14397
Conversation
…h list releases and get by id
Can I also backport this to release/v1.13 ? |
Makes it even more inconsistent due to Your solution is sound however it would require:
|
Codecov Report
@@ Coverage Diff @@
## master #14397 +/- ##
==========================================
+ Coverage 41.84% 41.86% +0.01%
==========================================
Files 744 744
Lines 79779 79782 +3
==========================================
+ Hits 33387 33400 +13
+ Misses 40874 40866 -8
+ Partials 5518 5516 -2
Continue to review full report at Codecov.
|
Not sure what you want conceptually for how gitea wants release/tags to function From my limited understanding, a tag can exist without a release - however there is still a row in the release table for said tag A release can be created for a tag which upgrades the row in the release table to be is_tag = false and fills on extra information I assumes that the |
No, the gitea/routers/api/v1/repo/release_tags.go Line 116 in 76da070
gitea/services/release/release.go Lines 149 to 155 in 8c086ba
By changing how gitea/routers/api/v1/repo/release_tags.go Lines 111 to 113 in 76da070
|
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 is a breaking change!
and should at first be considdered carefully!
Summary of my review: the #13358 is not jet been released .... so we could make I would suggest @cameronbraid ☝️ can you ajust this pull at least to the last one ... then I'll file a pull up myselve ... or you could go for the whole thing ;) |
It seems the github api is also filtering out tags without release: |
I'll adjust this pull & send a follow up ... |
🚀 |
* master: (22 commits) Add support for ref parameter to get raw file API (go-gitea#14602) Fixed irritating error message related to go version (go-gitea#14611) Use OldRef instead of CommitSHA for DeleteBranch comments (go-gitea#14604) Add information on how to build statically (go-gitea#14594) [skip ci] Updated translations via Crowdin Exclude the current dump file from the dump (go-gitea#14606) Remove spurious DataAsync Error logging (go-gitea#14599) [API] Add delete release by tag & fix unreleased inconsistency (go-gitea#14563) Fix rate limit bug when downloading assets on migrating from github (go-gitea#14564) [API] Add affected files of commits to commit struct (go-gitea#14579) [skip ci] Updated licenses and gitignores Fix locale init (go-gitea#14582) Add Content-Length header to HEAD requests (go-gitea#14542) Honor REGISTER_MANUAL_CONFIRM when doing openid registration (go-gitea#14548) Fix lfs file viewer (go-gitea#14568) Fix typo in generate-emoji.go (go-gitea#14570) Fix bug about ListOptions and stars/watchers pagnation (go-gitea#14556) Fix gpg key deletion (go-gitea#14561) [API] GetRelease by tag only return release (go-gitea#14397) Reduce data races (go-gitea#14549) ...
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