Fix issue detail view ignoring --owner flag (#899)

Co-authored-by: techknowlogick <techknowlogick@gitea.com>
Reviewed-on: https://gitea.com/gitea/tea/pulls/899
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-committed-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
Lunny Xiao
2026-02-19 18:57:23 +00:00
committed by techknowlogick
parent 0b1147bfc0
commit fab70f83c1
3 changed files with 87 additions and 0 deletions

View File

@@ -122,6 +122,13 @@ func reloadConfigFromDisk() error {
return nil
}
// SetConfigForTesting replaces the in-memory config and marks it as loaded.
// This allows tests to inject config without relying on file-based loading.
func SetConfigForTesting(cfg LocalConfig) {
loadConfigOnce.Do(func() {}) // ensure sync.Once is spent
config = cfg
}
// saveConfigUnsafe saves config to file without acquiring a lock.
// Caller must hold the config lock.
func saveConfigUnsafe() error {