(ctx context.Context, s *store.Store, taskRuns []*store.TaskRunMessage)
| 24 | } |
| 25 | |
| 26 | func convertToTaskRuns(ctx context.Context, s *store.Store, taskRuns []*store.TaskRunMessage) ([]*v1pb.TaskRun, error) { |
| 27 | var taskRunsV1 []*v1pb.TaskRun |
| 28 | for _, taskRun := range taskRuns { |
| 29 | taskRunV1, err := convertToTaskRun(ctx, s, taskRun) |
| 30 | if err != nil { |
| 31 | return nil, errors.Wrapf(err, "failed to convert task run") |
| 32 | } |
| 33 | taskRunsV1 = append(taskRunsV1, taskRunV1) |
| 34 | } |
| 35 | return taskRunsV1, nil |
| 36 | } |
| 37 | |
| 38 | func convertToTaskRun(ctx context.Context, s *store.Store, taskRun *store.TaskRunMessage) (*v1pb.TaskRun, error) { |
| 39 | stageID := common.FormatStageID(taskRun.Environment) |
no test coverage detected