(rc *RunContext, directory string, workflow string)
| 114 | } |
| 115 | |
| 116 | func newReusableWorkflowExecutor(rc *RunContext, directory string, workflow string) common.Executor { |
| 117 | return func(ctx context.Context) error { |
| 118 | planner, err := model.NewWorkflowPlanner(path.Join(directory, workflow), true, false) |
| 119 | if err != nil { |
| 120 | return err |
| 121 | } |
| 122 | |
| 123 | plan, err := planner.PlanEvent("workflow_call") |
| 124 | if err != nil { |
| 125 | return err |
| 126 | } |
| 127 | |
| 128 | runner, err := NewReusableWorkflowRunner(rc) |
| 129 | if err != nil { |
| 130 | return err |
| 131 | } |
| 132 | |
| 133 | return runner.NewPlanExecutor(plan)(ctx) |
| 134 | } |
| 135 | } |
| 136 | |
| 137 | func NewReusableWorkflowRunner(rc *RunContext) (Runner, error) { |
| 138 | runner := &runnerImpl{ |
no test coverage detected
searching dependent graphs…