SanitizeWorkflowIDForCacheKey sanitizes a workflow ID for use in cache keys. It removes all hyphens and converts to lowercase to create a filesystem-safe identifier. Example: "Smoke-Copilot" -> "smokecopilot"
(workflowID string)
| 221 | // It removes all hyphens and converts to lowercase to create a filesystem-safe identifier. |
| 222 | // Example: "Smoke-Copilot" -> "smokecopilot" |
| 223 | func SanitizeWorkflowIDForCacheKey(workflowID string) string { |
| 224 | // Convert to lowercase |
| 225 | sanitized := strings.ToLower(workflowID) |
| 226 | // Remove all hyphens |
| 227 | sanitized = strings.ReplaceAll(sanitized, "-", "") |
| 228 | return sanitized |
| 229 | } |
| 230 | |
| 231 | // sanitizeJobName converts a workflow name to a valid GitHub Actions job name. |
| 232 | // It delegates normalization to NormalizeSafeOutputIdentifier (which converts |