We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7a4de43 commit b0459c5Copy full SHA for b0459c5
routers/api/v1/repo/action.go
@@ -1194,6 +1194,14 @@ func ListWorkflowRunJobs(ctx *context.APIContext) {
1194
1195
runID := ctx.PathParamInt64("run")
1196
1197
+ // Avoid the list all jobs functionality for this api route to be used with a runID == 0.
1198
+ if runID <= 0 {
1199
+ ctx.APIError(http.StatusBadRequest, util.NewInvalidArgumentErrorf("runID must be a positive integer"))
1200
+ return
1201
+ }
1202
+
1203
+ // runID is used as an additional filter next to repoID to ensure that we only list jobs for the specified repoID and runID.
1204
+ // no additional checks for runID are needed here
1205
shared.ListJobs(ctx, 0, repoID, runID)
1206
}
1207
0 commit comments