1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-09-02 23:04:19 -04:00
gitea/routers/web/repo
Lunny Xiao cc27b50bdf
Fix a bug returning 404 when display a single tag with no release (#29466)
Partially caused by #29149 

When use

```go
releases, err := getReleaseInfos(ctx, &repo_model.FindReleasesOptions{
		ListOptions: db.ListOptions{Page: 1, PageSize: 1},
		RepoID:      ctx.Repo.Repository.ID,
		TagNames:    []string{ctx.Params("*")},
		// only show draft releases for users who can write, read-only users shouldn't see draft releases.
		IncludeDrafts: writeAccess,
	})
```
replace
```go
release, err := repo_model.GetRelease(ctx, ctx.Repo.Repository.ID, ctx.Params("*"))
```
It missed `IncludeTags: true,`. That means this bug will be occupied only when the release is a tag.
This PR will fix

 - Get the right tag record when it's not a release
 - Display correct tag tab but not release tag when it's a tag.
- The button will bring the tag name to the new page when it's a single tag page
- the new page will automatically hide the release target inputbox when the tag name is pre filled. This should be backport to v1.21.
2024-03-02 14:03:39 +00:00
..
actions Actions Artifacts v4 backend (#28965) 2024-03-02 09:12:17 +00:00
setting Move migration functions to services layer (#29497) 2024-03-01 02:23:00 +00:00
activity.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
attachment.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
blame.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
branch.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
cherry_pick.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
code_frequency.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
commit.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
compare.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
contributors.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
download.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
editor_test.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
editor.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
find.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
githttp_test.go Fix http protocol auth (#27875) 2023-11-02 22:14:33 +08:00
githttp.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
helper_test.go Make web context initialize correctly for different cases (#26726) 2023-08-25 19:07:42 +08:00
helper.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
issue_content_history.go Fix issue & comment history bugs (#29525) 2024-03-01 16:46:02 +00:00
issue_dependency.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
issue_label_test.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
issue_label.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
issue_lock.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
issue_pin.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
issue_stopwatch.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
issue_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
issue_timetrack.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
issue_watch.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
issue.go Rename Str2html to SanitizeHTML and clarify its behavior (#29516) 2024-03-01 10:16:19 +00:00
main_test.go make writing main test easier (#27270) 2023-09-28 01:38:53 +00:00
middlewares.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
migrate.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
milestone.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
packages.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
patch.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
projects_test.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
projects.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
pull_review_test.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
pull_review.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
pull.go Fix incorrect redirection when creating a PR fails (#29537) 2024-03-02 12:45:14 +00:00
recent_commits.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
release_test.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
release.go Fix a bug returning 404 when display a single tag with no release (#29466) 2024-03-02 14:03:39 +00:00
render.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
repo.go migrate some more "OptionalBool" to "Option[bool]" (#29479) 2024-02-29 18:52:49 +00:00
search.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
topic.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
treelist.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
view_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
view.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
wiki_test.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
wiki.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00