mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2026-04-15 01:41:56 +00:00
[Backport] sanitizeParamKey "-" to "_" for plugin settings (#1511)
da997fa34a/pipeline/frontend/yaml/compiler/settings/params.go (L45-L49)
This commit is contained in:
@@ -32,7 +32,7 @@ func paramsToEnv(from map[string]interface{}, to map[string]string, secrets map[
|
||||
func sanitizeParamKey(k string) string {
|
||||
return "PLUGIN_" +
|
||||
strings.ToUpper(
|
||||
strings.ReplaceAll(k, ".", "_"),
|
||||
strings.ReplaceAll(strings.ReplaceAll(k, ".", "_"), "-", "_"),
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user