[Backport] sanitizeParamKey "-" to "_" for plugin settings (#1511)

da997fa34a/pipeline/frontend/yaml/compiler/settings/params.go (L45-L49)
This commit is contained in:
6543 2022-12-31 18:21:34 +01:00 committed by GitHub
parent aa5be76c2b
commit 36fbd3a2bc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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, ".", "_"), "-", "_"),
)
}