Skip to content

Commit 1bca5a5

Browse files
authored
Workflows: Fix error source when unexpected time field is used (#437)
We support 2 time fields and use `0` and `1` to distinguish them. If user uses any other time fields `2`, `3`, ... this causes an error as it is not supported. The error should be downstream. <img width="636" alt="image" src="https://github.com/user-attachments/assets/96bd3b67-1260-421d-bdb4-3276d7d620cb" /> After fix: <img width="1506" alt="image" src="https://github.com/user-attachments/assets/7ca6f2f1-beb2-43dd-9674-e8ba45eb50ec" />
1 parent 012399a commit 1bca5a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/github/workflows.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ func keepWorkflowsInTimeRange(workflows []*googlegithub.Workflow, timeField mode
8888
}
8989

9090
default:
91-
return nil, fmt.Errorf("unexpected time field: %d", timeField)
91+
return nil, backend.DownstreamError(fmt.Errorf("unexpected time field: %d", timeField))
9292
}
9393

9494
out = append(out, workflow)

0 commit comments

Comments
 (0)