1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Refactor RefName (#33234)

And fix some FIXMEs
This commit is contained in:
wxiaoguang
2025-01-13 14:01:53 +08:00
committed by GitHub
parent 81352542fd
commit 2ea929a952
13 changed files with 58 additions and 60 deletions

View File

@@ -1572,6 +1572,7 @@ func registerRoutes(m *web.Router) {
m.Get("/atom/branch/*", context.RepoRefByType(context.RepoRefBranch), feedEnabled, feed.RenderBranchFeed)
m.Group("/src", func() {
m.Get("", func(ctx *context.Context) { ctx.Redirect(ctx.Repo.RepoLink) }) // there is no "{owner}/{repo}/src" page, so redirect to "{owner}/{repo}" to avoid 404
m.Get("/branch/*", context.RepoRefByType(context.RepoRefBranch), repo.Home)
m.Get("/tag/*", context.RepoRefByType(context.RepoRefTag), repo.Home)
m.Get("/commit/*", context.RepoRefByType(context.RepoRefCommit), repo.Home)