Skip to content

Fix additional long ids #1113

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions src/main/java/org/gitlab4j/api/PipelineApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
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;
Expand Down Expand Up @@ -858,6 +859,35 @@ public Stream<Variable> getPipelineVariablesStream(Object projectIdOrPath, Long
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.
*
Expand All @@ -866,6 +896,7 @@ public Stream<Variable> getPipelineVariablesStream(Object projectIdOrPath, Long
* @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
*/
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/gitlab4j/api/models/Bridge.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -92,11 +92,11 @@ public void setQueuedDuration(Double queuedDuration) {
this.queuedDuration = queuedDuration;
}

public int getId() {
public Long getId() {
return id;
}

public void setId(int id) {
public void setId(Long id) {
this.id = id;
}

Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/gitlab4j/api/models/DownstreamPipeline.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@
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;
private Date createdAt;
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;
}

Expand Down
Loading