mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-23 19:47:07 +09:00
Fix incorrect ref commit ID usage (#33331)
After the RefName refactoring, the `ctx.Repo.CommitID` is only set when there is a `RepoRefByType` middleware. Many handlers do not use that middleware and they only use "default branch"
This commit is contained in:
1 parent
39de2955fd
commit
6cc1067884
6 files changed
+15
-7
No files matched your search
+2
-2
@@ -1146,7 +1146,7 @@ func registerRoutes(m *web.Router) {
|
||||
m.Post("/cancel", repo.MigrateCancelPost)
|
||||
})
|
||||
},
|
||||
reqSignIn, context.RepoAssignment, reqRepoAdmin, context.RepoRef(),
|
||||
reqSignIn, context.RepoAssignment, reqRepoAdmin,
|
||||
ctxDataSet("PageIsRepoSettings", true, "LFSStartServer", setting.LFS.StartServer),
|
||||
)
|
||||
// end "/{username}/{reponame}/settings"
|
||||
@@ -1513,7 +1513,7 @@ func registerRoutes(m *web.Router) {
|
||||
m.Group("/activity_author_data", func() {
|
||||
m.Get("", repo.ActivityAuthors)
|
||||
m.Get("/{period}", repo.ActivityAuthors)
|
||||
}, context.RepoRef(), repo.MustBeNotEmpty)
|
||||
}, repo.MustBeNotEmpty)
|
||||
|
||||
m.Group("/archive", func() {
|
||||
m.Get("/*", repo.Download)
|
||||
|
||||
Reference in new issue
Block a user