Skip to content

Commit

Permalink
Parse variable names from json playbook on decode
Browse files Browse the repository at this point in the history
  • Loading branch information
MaartendeKruijf committed Mar 11, 2024
1 parent af6e7cc commit 1cdeb1b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions models/decoder/cacao.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,17 @@ func decode(data []byte) *cacao.Playbook {
playbook.AuthenticationInfoDefinitions[key] = auth
}

for key, variable := range playbook.PlaybookVariables {
variable.Name = key
playbook.PlaybookVariables.InsertOrReplace(variable)
}

for _, step := range playbook.Workflow {
for key, variable := range step.StepVariables {
variable.Name = key
step.StepVariables.InsertOrReplace(variable)
}
}

return &playbook
}

0 comments on commit 1cdeb1b

Please sign in to comment.