From 7ccc177b84a20e10af55845c405defc4c06ee4bc Mon Sep 17 00:00:00 2001 From: &es <84567633+and-es@users.noreply.github.com> Date: Tue, 18 Feb 2025 23:15:39 +0900 Subject: [PATCH] Sanitize labels ending in hyphen, underscore, and dot (#3664) --- controllers/actions.github.com/resourcebuilder.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/actions.github.com/resourcebuilder.go b/controllers/actions.github.com/resourcebuilder.go index 57fd7257..152eea6d 100644 --- a/controllers/actions.github.com/resourcebuilder.go +++ b/controllers/actions.github.com/resourcebuilder.go @@ -747,7 +747,7 @@ func trimLabelValue(val string) string { if len(val) > 63 { return val[:63-len(trimLabelVauleSuffix)] + trimLabelVauleSuffix } - return val + return strings.Trim(val, "-_.") } func (b *ResourceBuilder) mergeLabels(base, overwrite map[string]string) map[string]string {