Skip to content

Commit

Permalink
Merge branch 'master' into autobump-korkVersion
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Aug 26, 2020
2 parents 1aaab91 + d68a1d9 commit ff34f72
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
@JsonInclude(JsonInclude.Include.NON_NULL)
public class GenericBuild {
private boolean building;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,15 @@ public interface CiBuildService {
*
* @param projectKey the project key
* @param repoSlug the repository name
* @param buildNumber the build number
* @param commitId the commit id
* @param completionStatus filter builds based on status
* @return a list of builds
*/
List<GenericBuild> getBuilds(String projectKey, String repoSlug, String completionStatus);
List<GenericBuild> getBuilds(
String projectKey,
String repoSlug,
String buildNumber,
String commitId,
String completionStatus);
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,12 @@ public CiController(Optional<CiBuildService> ciBuildService) {

@GetMapping("/builds")
public List<GenericBuild> getBuilds(
@RequestParam(value = "projectKey") String projectKey,
@RequestParam(value = "repoSlug") String repoSlug,
@RequestParam(value = "projectKey", required = false) String projectKey,
@RequestParam(value = "repoSlug", required = false) String repoSlug,
@RequestParam(value = "buildNumber", required = false) String buildNumber,
@RequestParam(value = "commitId", required = false) String commitId,
@RequestParam(value = "completionStatus", required = false) String completionStatus) {
return getCiService().getBuilds(projectKey, repoSlug, completionStatus);
return getCiService().getBuilds(projectKey, repoSlug, buildNumber, commitId, completionStatus);
}

private CiBuildService getCiService() {
Expand Down

0 comments on commit ff34f72

Please sign in to comment.