https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#onworkflow_callinputs
(id string, name *String, n *yaml.Node)
| 540 | |
| 541 | // https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#onworkflow_callinputs |
| 542 | func (p *parser) parseWorkflowCallEventInput(id string, name *String, n *yaml.Node) *WorkflowCallEventInput { |
| 543 | ret := &WorkflowCallEventInput{Name: name, ID: id} |
| 544 | typed := false |
| 545 | |
| 546 | for e := range p.parseMappingAt("input of workflow_call event", n, true, true) { |
| 547 | switch e.id { |
| 548 | case "description": |
| 549 | ret.Description = p.parseString(e.val, true) |
| 550 | case "required": |
| 551 | ret.Required = p.parseBool(e.val) |
| 552 | case "default": |
| 553 | ret.Default = p.parseString(e.val, true) |
| 554 | case "type": |
| 555 | typed = true |
| 556 | if !p.checkString(e.val, false) { |
| 557 | continue |
| 558 | } |
| 559 | switch e.val.Value { |
| 560 | case "boolean": |
| 561 | ret.Type = WorkflowCallEventInputTypeBoolean |
| 562 | case "number": |
| 563 | ret.Type = WorkflowCallEventInputTypeNumber |
| 564 | case "string": |
| 565 | ret.Type = WorkflowCallEventInputTypeString |
| 566 | default: |
| 567 | p.errorf(e.val, "invalid value %q for input type of workflow_call event. it must be one of \"boolean\", \"number\", or \"string\"", e.val.Value) |
| 568 | } |
| 569 | default: |
| 570 | p.unexpectedKey(e.key, "inputs at workflow_call event", []string{"description", "required", "default", "type"}) |
| 571 | } |
| 572 | } |
| 573 | |
| 574 | if !typed { |
| 575 | p.errorfAt(name.Pos, "\"type\" is missing at %q input of workflow_call event", name.Value) |
| 576 | } |
| 577 | |
| 578 | return ret |
| 579 | } |
| 580 | |
| 581 | // https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#example-of-onworkflow_callsecrets |
| 582 | func (p *parser) parseWorkflowCallEventSecret(name *String, n *yaml.Node) *WorkflowCallEventSecret { |
no test coverage detected