@@ -0,0 +1,514 @@
+package org.jenkinsci.plugins.ghprb.downstreambuilds;%0A%0Aimport org.jenkinsci.plugins.ghprb.GhprbDefaultBuildManager;%0A%0Aimport com.cloudbees.plugins.flow.FlowRun;%0A%0Aimport hudson.model.AbstractBuild;%0A%0A/**%0A * @author mdelapenya (Manuel de la Pe%C3%B1a)%0A */%0Apublic class DownstreamBuildManagerFactoryUtil %7B%0A%0A%09public static IDownstreamBuildManager getBuildManager(AbstractBuild build) %7B%0A%09%09if (build instanceof FlowRun) %7B%0A%09%09%09return new DownstreamBuildFlowManager(build);%0A%09%09%7D%0A%0A%09%09return new GhprbDefaultBuildManager(build);%0A%09%7D%0A%0A%7D

Use a factory to decide which downstream manager to use