10
10
import jakarta .ws .rs .core .Response ;
11
11
12
12
import org .gitlab4j .api .models .Bridge ;
13
+ import org .gitlab4j .api .models .Job ;
13
14
import org .gitlab4j .api .models .Pipeline ;
14
15
import org .gitlab4j .api .models .PipelineFilter ;
15
16
import org .gitlab4j .api .models .PipelineSchedule ;
@@ -858,6 +859,35 @@ public Stream<Variable> getPipelineVariablesStream(Object projectIdOrPath, Long
858
859
return (getPipelineVariables (projectIdOrPath , pipelineId , getDefaultPerPage ()).stream ());
859
860
}
860
861
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
+
861
891
/**
862
892
* Get a Pager of bridges in a pipeline.
863
893
*
@@ -866,6 +896,7 @@ public Stream<Variable> getPipelineVariablesStream(Object projectIdOrPath, Long
866
896
* @param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path to get the pipelines for
867
897
* @param pipelineId the pipeline ID to get the list of bridges for
868
898
* @param itemsPerPage the number of Bridge instances that will be fetched per page
899
+ * @param scope the scope of the jobs to list
869
900
* @return a list containing the bridges for the specified project ID and pipeline ID
870
901
* @throws GitLabApiException if any exception occurs during execution
871
902
*/
0 commit comments