]> source.dussan.org Git - gitea.git/commit
Make web context initialize correctly for different cases (#26726)
authorwxiaoguang <wxiaoguang@gmail.com>
Fri, 25 Aug 2023 11:07:42 +0000 (19:07 +0800)
committerGitHub <noreply@github.com>
Fri, 25 Aug 2023 11:07:42 +0000 (19:07 +0800)
commit412e5c0946fc5b83456685bc2fb1aed682228f57
tree1dc1a823618d554f740cff449e20c1538ad95ba3
parentee9e83b230981437acf8c331e93a41cdc95af443
Make web context initialize correctly for different cases (#26726)

The web context (modules/context.Context) is quite complex, it's
difficult for the callers to initialize correctly.

This PR introduces a `NewWebContext` function, to make sure the web
context have the same behavior for different cases.
modules/context/context.go
modules/context/package.go
modules/test/context_tests.go
routers/install/install.go
routers/web/repo/actions/actions.go
routers/web/repo/helper.go
routers/web/repo/helper_test.go
routers/web/repo/issue.go
routers/web/repo/pull.go
routers/web/repo/release.go
services/markup/processorhelper_test.go