loading up the forgejo repo on tangled to test page performance
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix env config parsing for "GITEA____APP_NAME" (#26001)

Regression of #24832

Fix the bug and add a test for it

Co-authored-by: Giteabot <teabot@gitea.io>

authored by

wxiaoguang
Giteabot
and committed by
GitHub
28ecac80 d7a8d09d

+7 -1
+1 -1
modules/setting/config_env.go
··· 86 86 key += remaining 87 87 } 88 88 section = strings.ToLower(section) 89 - ok = section != "" && key != "" 89 + ok = key != "" 90 90 if !ok { 91 91 section = "" 92 92 key = ""
+6
modules/setting/config_env_test.go
··· 48 48 assert.Equal(t, "", key) 49 49 assert.False(t, file) 50 50 51 + ok, section, key, file = decodeEnvironmentKey(prefix, suffix, "GITEA____KEY") 52 + assert.True(t, ok) 53 + assert.Equal(t, "", section) 54 + assert.Equal(t, "KEY", key) 55 + assert.False(t, file) 56 + 51 57 ok, section, key, file = decodeEnvironmentKey(prefix, suffix, "GITEA__SEC__KEY") 52 58 assert.True(t, ok) 53 59 assert.Equal(t, "sec", section)