1010import javax .ws .rs .core .Response ;
1111
1212import org .gitlab4j .api .models .Bridge ;
13+ import org .gitlab4j .api .models .Job ;
1314import org .gitlab4j .api .models .Pipeline ;
1415import org .gitlab4j .api .models .PipelineFilter ;
1516import 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 */
0 commit comments