-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Add single release page and latest redirect #11102
Conversation
Codecov Report
@@ Coverage Diff @@
## master #11102 +/- ##
==========================================
- Coverage 43.52% 43.49% -0.03%
==========================================
Files 599 599
Lines 84817 84865 +48
==========================================
- Hits 36913 36909 -4
- Misses 43355 43405 +50
- Partials 4549 4551 +2
Continue to review full report at Codecov.
|
Signed-off-by: jolheiser <[email protected]>
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.
nice exactly what I thought 👍
@jolheiser just confince swagger by |
Signed-off-by: jolheiser <[email protected]>
Thanks, done. |
Ping LG-TM |
// GetLatestReleaseByRepoID returns the latest release for a repository | ||
func GetLatestReleaseByRepoID(repoID int64) (*Release, error) { | ||
cond := builder.NewCond(). | ||
And(builder.Eq{"repo_id": repoID}). |
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.
In fact, you can use builer.Eq{ "repo_id": repoID, "is_draft": false, ... }
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.
Good to know
* Add single release and latest release routes Signed-off-by: jolheiser <[email protected]> * Update API and move latest search to models Signed-off-by: jolheiser <[email protected]> * Fix swagger Signed-off-by: jolheiser <[email protected]> Co-authored-by: guillep2k <[email protected]>
This PR is fairly simple as it re-uses our existing release list template, but with only a single release on the page.
It also adds a redirect to the latest release.