MCPcopy Create free account
hub / github.com/github/gh-aw / NormalizeSafeOutputIdentifier

Function NormalizeSafeOutputIdentifier

pkg/stringutil/identifiers.go:62–66  ·  view source on GitHub ↗

NormalizeSafeOutputIdentifier converts dashes and periods to underscores for safe output identifiers. This standardizes identifier format to the internal underscore-separated format used in safe outputs configuration and MCP tool names. Both dash-separated and underscore-separated formats are valid

(identifier string)

Source from the content-addressed store, hash-verified

60// NormalizeSafeOutputIdentifier("update-pr") // returns "update_pr"
61// NormalizeSafeOutputIdentifier("executor-workflow.agent") // returns "executor_workflow_agent"
62func NormalizeSafeOutputIdentifier(identifier string) string {
63 result := strings.ReplaceAll(identifier, "-", "_")
64 result = strings.ReplaceAll(result, ".", "_")
65 return result
66}
67
68// MarkdownToLockFile converts a workflow markdown file path to its compiled lock file path.
69// This is the standard transformation for agentic workflow files.

Calls

no outgoing calls