mirror of
https://github.com/go-gitea/gitea
synced 2025-07-23 02:38:35 +00: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:
@@ -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