Skip to content

Commit

Permalink
feat(pipelines): allow user-specified limit when fetching latest pipe…
Browse files Browse the repository at this point in the history
…lines (#1293)
  • Loading branch information
anotherchrisberry committed Apr 25, 2017
1 parent 01762bc commit 8806373
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,12 @@ class TaskController {
@RequestMapping(value = "/pipelines", method = RequestMethod.GET)
List<Pipeline> listLatestPipelines(
@RequestParam(value = "pipelineConfigIds") String pipelineConfigIds,
@RequestParam(value = "limit", required = false) Integer limit,
@RequestParam(value = "statuses", required = false) String statuses) {
statuses = statuses ?: ExecutionStatus.values()*.toString().join(",")
limit = limit ?: 1
def executionCriteria = new ExecutionRepository.ExecutionCriteria(
limit: 1,
limit: limit,
statuses: (statuses.split(",") as Collection)
)

Expand Down

0 comments on commit 8806373

Please sign in to comment.