Unverified Commit 346a02a0 authored by Clayton Walker's avatar Clayton Walker Committed by GitHub
Browse files

Change the type of ids to be Long (#1113)



Co-authored-by: default avatarClayton Walker <cwalker@sofi.org>
parent c5dbbd28
......@@ -10,6 +10,7 @@ import javax.ws.rs.core.GenericType;
import javax.ws.rs.core.Response;
import org.gitlab4j.api.models.Bridge;
import org.gitlab4j.api.models.Job;
import org.gitlab4j.api.models.Pipeline;
import org.gitlab4j.api.models.PipelineFilter;
import org.gitlab4j.api.models.PipelineSchedule;
......@@ -858,6 +859,35 @@ public class PipelineApi extends AbstractApi implements Constants {
return (getPipelineVariables(projectIdOrPath, pipelineId, getDefaultPerPage()).stream());
}
/**
* Get a List of bridges in a pipeline.
*
* <pre><code>GitLab Endpoint: GET /projects/:id/pipelines/:pipeline_id/bridges </code></pre>
*
* @param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path to get the pipelines for
* @param pipelineId the pipeline ID to get the list of bridges for
* @return a list containing the bridges for the specified project ID and pipeline ID
* @throws GitLabApiException if any exception occurs during execution
*/
public List<Bridge> getBridgesForPipeline(Object projectIdOrPath, long pipelineId) throws GitLabApiException {
return (getBridgesForPipeline(projectIdOrPath, pipelineId, getDefaultPerPage(), null).all());
}
/**
* Get a List of bridges in a pipeline.
*
* <pre><code>GitLab Endpoint: GET /projects/:id/pipelines/:pipeline_id/bridges </code></pre>
*
* @param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path to get the pipelines for
* @param pipelineId the pipeline ID to get the list of bridges for
* @param scope the scope of the jobs to list
* @return a list containing the bridges for the specified project ID and pipeline ID
* @throws GitLabApiException if any exception occurs during execution
*/
public List<Bridge> getBridgesForPipeline(Object projectIdOrPath, long pipelineId, JobScope scope) throws GitLabApiException {
return (getBridgesForPipeline(projectIdOrPath, pipelineId, getDefaultPerPage(), scope).all());
}
/**
* Get a Pager of bridges in a pipeline.
*
......@@ -866,6 +896,7 @@ public class PipelineApi extends AbstractApi implements Constants {
* @param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path to get the pipelines for
* @param pipelineId the pipeline ID to get the list of bridges for
* @param itemsPerPage the number of Bridge instances that will be fetched per page
* @param scope the scope of the jobs to list
* @return a list containing the bridges for the specified project ID and pipeline ID
* @throws GitLabApiException if any exception occurs during execution
*/
......
......@@ -16,7 +16,7 @@ public class Bridge implements Serializable {
private Date erasedAt;
private Double duration;
private Double queuedDuration;
private int id;
private Long id;
private String name;
private String coverage;
private Pipeline pipeline;
......@@ -92,11 +92,11 @@ public class Bridge implements Serializable {
this.queuedDuration = queuedDuration;
}
public int getId() {
public Long getId() {
return id;
}
public void setId(int id) {
public void setId(Long id) {
this.id = id;
}
......
......@@ -8,7 +8,7 @@ import java.util.Date;
public class DownstreamPipeline implements Serializable {
private static final long serialVersionUID = 1L;
private int id;
private Long id;
private String sha;
private String ref;
private String status;
......@@ -16,11 +16,11 @@ public class DownstreamPipeline implements Serializable {
private Date updatedAt;
private String webUrl;
public int getId() {
public Long getId() {
return id;
}
public void setId(int id) {
public void setId(Long id) {
this.id = id;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment