Skip to content
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

Merged
merged 7 commits into from
Apr 18, 2020

Conversation

jolheiser
Copy link
Member

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.

@jolheiser jolheiser added the type/enhancement An improvement of existing functionality label Apr 17, 2020
@jolheiser jolheiser added this to the 1.12.0 milestone Apr 17, 2020
@codecov-io
Copy link

Codecov Report

Merging #11102 into master will decrease coverage by 0.02%.
The diff coverage is 6.12%.

Impacted file tree graph

@@            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     
Impacted Files Coverage Δ
routers/repo/release.go 27.75% <0.00%> (-5.44%) ⬇️
routers/routes/routes.go 86.61% <100.00%> (+0.03%) ⬆️
modules/queue/workerpool.go 54.80% <0.00%> (-3.21%) ⬇️
modules/notification/webhook/webhook.go 39.61% <0.00%> (-0.59%) ⬇️
services/pull/pull.go 33.39% <0.00%> (-0.58%) ⬇️
models/issue.go 51.48% <0.00%> (-0.47%) ⬇️
modules/git/repo.go 48.11% <0.00%> (+0.83%) ⬆️
models/unit.go 44.44% <0.00%> (+2.46%) ⬆️
modules/git/utils.go 70.14% <0.00%> (+4.47%) ⬆️
modules/indexer/stats/db.go 59.37% <0.00%> (+18.75%) ⬆️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c52d48a...c734ebe. Read the comment docs.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Apr 17, 2020
routers/repo/release.go Outdated Show resolved Hide resolved
Copy link
Member

@6543 6543 left a 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 👍

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Apr 17, 2020
@6543
Copy link
Member

6543 commented Apr 17, 2020

@jolheiser just confince swagger by make generate-swagger ;)

Signed-off-by: jolheiser <[email protected]>
@jolheiser
Copy link
Member Author

@jolheiser just confince swagger by make generate-swagger ;)

Thanks, done.

@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Apr 18, 2020
@guillep2k
Copy link
Member

Ping LG-TM

@guillep2k guillep2k merged commit 4f597b1 into go-gitea:master Apr 18, 2020
// GetLatestReleaseByRepoID returns the latest release for a repository
func GetLatestReleaseByRepoID(repoID int64) (*Release, error) {
cond := builder.NewCond().
And(builder.Eq{"repo_id": repoID}).
Copy link
Member

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, ... }

Copy link
Member

Choose a reason for hiding this comment

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

Good to know

ydelafollye pushed a commit to ydelafollye/gitea that referenced this pull request Jul 31, 2020
* 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]>
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants