1
1
mirror of https://github.com/go-gitea/gitea synced 2024-11-02 08:14:25 +00:00
gitea/templates
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
..
admin Use tailwind instead of gt-[wh]- helper classes (#29423) 2024-02-27 14:31:41 +00:00
api/packages/pypi Remove incorrect HTML self close tag (#23748) 2023-03-27 18:05:51 +02:00
base Rename Str2html to SanitizeHTML and clarify its behavior (#29516) 2024-03-01 10:16:19 +00:00
code Remove incorrect and unnecessary Escape from templates (#29394) 2024-02-25 14:02:20 +00:00
custom Add footer extra links template (#9576) 2020-01-03 20:41:56 +02:00
devtest Use tailwind instead of gt-[wh]- helper classes (#29423) 2024-02-27 14:31:41 +00:00
explore Only use supported sort order for "explore/users" page (#29430) 2024-02-27 17:10:51 +08:00
mail Rename Str2html to SanitizeHTML and clarify its behavior (#29516) 2024-03-01 10:16:19 +00:00
org Refactor some Str2html code (#29397) 2024-03-01 07:11:51 +00:00
package Refactor some Str2html code (#29397) 2024-03-01 07:11:51 +00:00
projects Refactor some Str2html code (#29397) 2024-03-01 07:11:51 +00:00
repo Fix a bug returning 404 when display a single tag with no release (#29466) 2024-03-02 14:03:39 +00:00
shared Refactor some Str2html code (#29397) 2024-03-01 07:11:51 +00:00
status Rename Str2html to SanitizeHTML and clarify its behavior (#29516) 2024-03-01 10:16:19 +00:00
swagger Add admin API route for managing user's badges (#23106) 2024-03-01 03:23:28 -05:00
user Allow options to disable user gpg keys configuration from the interface on app.ini (#29486) 2024-03-02 01:21:01 +00:00
webhook Change webhook-type in create-view (#29114) 2024-02-15 14:59:48 +01:00
home.tmpl Remove unnecessary "Str2html" modifier from templates (#29319) 2024-02-22 18:05:47 +00:00
install.tmpl Remove unnecessary "Safe" modifier from templates (#29318) 2024-02-22 17:02:33 +00:00
post-install.tmpl Always use ctx.Locale.Tr inside templates (#27231) 2023-09-25 08:56:50 +00:00