You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gitea/routers/web
oliverpool 8030614386
fix: release page for empty or non-existing target (#24470)
Fixes #24145

To solve the bug, I added a "computed" `TargetBehind` field to the
`Release` model, which indicates the target branch of a release.
This is particularly useful if the target branch was deleted in the
meantime (or is empty).

I also did a micro-optimization in `calReleaseNumCommitsBehind`. Instead
of checking that a branch exists and then call `GetBranchCommit`, I
immediately call `GetBranchCommit` and handle the `git.ErrNotExist`
error.

This optimization is covered by the added unit test.
2 years ago
..
admin Rewrite queue (#24505) 2 years ago
auth Split "modules/context.go" to separate files (#24569) 2 years ago
devtest Remove untranslatable `on_date` key (#24106) 2 years ago
events Implement FSFE REUSE for golang files (#21840) 2 years ago
explore Sort users and orgs on explore by recency by default (#24279) 2 years ago
feed Pass 'not' to commit count (#24473) 2 years ago
healthcheck Refactor `setting.Database.UseXXX` to methods (#23354) 2 years ago
misc Refactor "route" related code, fix Safari cookie bug (#24330) 2 years ago
org Fix close org projects (#24588) 2 years ago
repo fix: release page for empty or non-existing target (#24470) 2 years ago
shared Add Gitea Profile Readmes (#23260) 2 years ago
user Add Gitea Profile Readmes (#23260) 2 years ago
auth.go Implement FSFE REUSE for golang files (#21840) 2 years ago
auth_windows.go Implement FSFE REUSE for golang files (#21840) 2 years ago
base.go Improve template system and panic recovery (#24461) 2 years ago
goget.go refactor some functions to support ctx as first parameter (#21878) 2 years ago
home.go Refactor cookie (#24107) 2 years ago
metrics.go Implement FSFE REUSE for golang files (#21840) 2 years ago
nodeinfo.go Implement FSFE REUSE for golang files (#21840) 2 years ago
swagger_json.go Group template helper functions, remove `Printf`, improve template error messages (#23982) 2 years ago
web.go Rewrite queue (#24505) 2 years ago
webfinger.go Use User.ID instead of User.Name in ActivityPub API for Person IRI (#23823) 2 years ago