Skip to content

Commit 32c31a5

Browse files
committed
Merge remote-tracking branch 'origin/main' into 6.x
2 parents ffc29df + 346a02a commit 32c31a5

File tree

3 files changed

+37
-6
lines changed

3 files changed

+37
-6
lines changed

src/main/java/org/gitlab4j/api/PipelineApi.java

+31
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import jakarta.ws.rs.core.Response;
1111

1212
import org.gitlab4j.api.models.Bridge;
13+
import org.gitlab4j.api.models.Job;
1314
import org.gitlab4j.api.models.Pipeline;
1415
import org.gitlab4j.api.models.PipelineFilter;
1516
import org.gitlab4j.api.models.PipelineSchedule;
@@ -858,6 +859,35 @@ public Stream<Variable> getPipelineVariablesStream(Object projectIdOrPath, Long
858859
return (getPipelineVariables(projectIdOrPath, pipelineId, getDefaultPerPage()).stream());
859860
}
860861

862+
/**
863+
* Get a List of bridges in a pipeline.
864+
*
865+
* <pre><code>GitLab Endpoint: GET /projects/:id/pipelines/:pipeline_id/bridges </code></pre>
866+
*
867+
* @param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path to get the pipelines for
868+
* @param pipelineId the pipeline ID to get the list of bridges for
869+
* @return a list containing the bridges for the specified project ID and pipeline ID
870+
* @throws GitLabApiException if any exception occurs during execution
871+
*/
872+
public List<Bridge> getBridgesForPipeline(Object projectIdOrPath, long pipelineId) throws GitLabApiException {
873+
return (getBridgesForPipeline(projectIdOrPath, pipelineId, getDefaultPerPage(), null).all());
874+
}
875+
876+
/**
877+
* Get a List of bridges in a pipeline.
878+
*
879+
* <pre><code>GitLab Endpoint: GET /projects/:id/pipelines/:pipeline_id/bridges </code></pre>
880+
*
881+
* @param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path to get the pipelines for
882+
* @param pipelineId the pipeline ID to get the list of bridges for
883+
* @param scope the scope of the jobs to list
884+
* @return a list containing the bridges for the specified project ID and pipeline ID
885+
* @throws GitLabApiException if any exception occurs during execution
886+
*/
887+
public List<Bridge> getBridgesForPipeline(Object projectIdOrPath, long pipelineId, JobScope scope) throws GitLabApiException {
888+
return (getBridgesForPipeline(projectIdOrPath, pipelineId, getDefaultPerPage(), scope).all());
889+
}
890+
861891
/**
862892
* Get a Pager of bridges in a pipeline.
863893
*
@@ -866,6 +896,7 @@ public Stream<Variable> getPipelineVariablesStream(Object projectIdOrPath, Long
866896
* @param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path to get the pipelines for
867897
* @param pipelineId the pipeline ID to get the list of bridges for
868898
* @param itemsPerPage the number of Bridge instances that will be fetched per page
899+
* @param scope the scope of the jobs to list
869900
* @return a list containing the bridges for the specified project ID and pipeline ID
870901
* @throws GitLabApiException if any exception occurs during execution
871902
*/

src/main/java/org/gitlab4j/api/models/Bridge.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public class Bridge implements Serializable {
1616
private Date erasedAt;
1717
private Double duration;
1818
private Double queuedDuration;
19-
private int id;
19+
private Long id;
2020
private String name;
2121
private String coverage;
2222
private Pipeline pipeline;
@@ -92,11 +92,11 @@ public void setQueuedDuration(Double queuedDuration) {
9292
this.queuedDuration = queuedDuration;
9393
}
9494

95-
public int getId() {
95+
public Long getId() {
9696
return id;
9797
}
9898

99-
public void setId(int id) {
99+
public void setId(Long id) {
100100
this.id = id;
101101
}
102102

src/main/java/org/gitlab4j/api/models/DownstreamPipeline.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,19 @@
88
public class DownstreamPipeline implements Serializable {
99
private static final long serialVersionUID = 1L;
1010

11-
private int id;
11+
private Long id;
1212
private String sha;
1313
private String ref;
1414
private String status;
1515
private Date createdAt;
1616
private Date updatedAt;
1717
private String webUrl;
1818

19-
public int getId() {
19+
public Long getId() {
2020
return id;
2121
}
2222

23-
public void setId(int id) {
23+
public void setId(Long id) {
2424
this.id = id;
2525
}
2626

0 commit comments

Comments
 (0)