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

Function safeOutputsWithDispatchTargetRef

pkg/workflow/safe_outputs_config.go:1065–1071  ·  view source on GitHub ↗

safeOutputsWithDispatchTargetRef returns a shallow copy of cfg with the dispatch_workflow TargetRef overridden to targetRef. Only DispatchWorkflow is deep-copied; all other pointer fields remain shared. This avoids mutating the original config.

(cfg *SafeOutputsConfig, targetRef string)

Source from the content-addressed store, hash-verified

1063// TargetRef overridden to targetRef. Only DispatchWorkflow is deep-copied; all other
1064// pointer fields remain shared. This avoids mutating the original config.
1065func safeOutputsWithDispatchTargetRef(cfg *SafeOutputsConfig, targetRef string) *SafeOutputsConfig {
1066 dispatchCopy := *cfg.DispatchWorkflow
1067 dispatchCopy.TargetRef = targetRef
1068 configCopy := *cfg
1069 configCopy.DispatchWorkflow = &dispatchCopy
1070 return &configCopy
1071}
1072
1073// getEngineAgentFileInfo returns the engine-specific manifest filenames and path prefixes
1074// by type-asserting the active engine to AgentFileProvider. Returns empty slices when

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected