safeOutputsWithDispatchTargetRepo returns a shallow copy of cfg with the dispatch_workflow TargetRepoSlug overridden to targetRepo. Only DispatchWorkflow is deep-copied; all other pointer fields remain shared. This avoids mutating the original config.
(cfg *SafeOutputsConfig, targetRepo string)
| 1052 | // TargetRepoSlug overridden to targetRepo. Only DispatchWorkflow is deep-copied; all other |
| 1053 | // pointer fields remain shared. This avoids mutating the original config. |
| 1054 | func safeOutputsWithDispatchTargetRepo(cfg *SafeOutputsConfig, targetRepo string) *SafeOutputsConfig { |
| 1055 | dispatchCopy := *cfg.DispatchWorkflow |
| 1056 | dispatchCopy.TargetRepoSlug = targetRepo |
| 1057 | configCopy := *cfg |
| 1058 | configCopy.DispatchWorkflow = &dispatchCopy |
| 1059 | return &configCopy |
| 1060 | } |
| 1061 | |
| 1062 | // safeOutputsWithDispatchTargetRef returns a shallow copy of cfg with the dispatch_workflow |
| 1063 | // TargetRef overridden to targetRef. Only DispatchWorkflow is deep-copied; all other |
no outgoing calls
no test coverage detected