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

Function runtimeConfigToMap

pkg/workflow/frontmatter_serialization.go:250–271  ·  view source on GitHub ↗

runtimeConfigToMap converts a single RuntimeConfig to map[string]any

(rc *RuntimeConfig)

Source from the content-addressed store, hash-verified

248
249// runtimeConfigToMap converts a single RuntimeConfig to map[string]any
250func runtimeConfigToMap(rc *RuntimeConfig) map[string]any {
251 m := map[string]any{}
252 if rc.Version != "" {
253 m["version"] = rc.Version
254 }
255 if rc.If != "" {
256 m["if"] = rc.If
257 }
258 if rc.ActionRepo != "" {
259 m["action-repo"] = rc.ActionRepo
260 }
261 if rc.ActionVersion != "" {
262 m["action-version"] = rc.ActionVersion
263 }
264 if rc.Cooldown != nil {
265 m["cooldown"] = *rc.Cooldown
266 }
267 if rc.RunInstallScripts != nil {
268 m["run-install-scripts"] = *rc.RunInstallScripts
269 }
270 return m
271}
272
273// runtimesConfigToMap converts RuntimesConfig back to map[string]any
274func runtimesConfigToMap(config *RuntimesConfig) map[string]any {

Callers 1

runtimesConfigToMapFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected