Skip to content
Permalink
Browse files

[JENKINS-48035] Revert branch-api back to test scope and use SCMSourc…

…eOwner
  • Loading branch information
rsandell committed Dec 12, 2017
1 parent 9213e3b commit 93cc3f46474d74a9b7defa7c43ab3c1a59c87a04
11 pom.xml
@@ -68,11 +68,6 @@
<artifactId>display-url-api</artifactId>
<version>0.2</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>branch-api</artifactId>
<version>2.0.16</version>
</dependency>
<!-- Currently just here for interactive testing via hpi:run: -->
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
@@ -93,6 +88,12 @@
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>branch-api</artifactId>
<version>2.0.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-aggregator</artifactId>
@@ -4,7 +4,7 @@
import com.cloudbees.jenkins.GitHubRepositoryNameContributor;
import hudson.Extension;
import hudson.model.Item;
import jenkins.branch.MultiBranchProject;
import jenkins.scm.api.SCMSourceOwner;

import java.util.Collection;

@@ -13,8 +13,8 @@

@Override
public void parseAssociatedNames(Item item, Collection<GitHubRepositoryName> result) {
if (item instanceof MultiBranchProject) {
MultiBranchProject mp = (MultiBranchProject) item;
if (item instanceof SCMSourceOwner) {
SCMSourceOwner mp = (SCMSourceOwner) item;
for (Object o : mp.getSCMSources()) {
if (o instanceof GitHubSCMSource) {
GitHubSCMSource gitHubSCMSource = (GitHubSCMSource) o;

0 comments on commit 93cc3f4

Please sign in to comment.
You can’t perform that action at this time.