Skip to content

Commit

Permalink
[JENKINS-48035] Revert branch-api back to test scope and use SCMSourc…
Browse files Browse the repository at this point in the history
…eOwner
  • Loading branch information
rsandell committed Dec 12, 2017
1 parent 9213e3b commit 93cc3f4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
11 changes: 6 additions & 5 deletions pom.xml
Expand Up @@ -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>
Expand All @@ -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>
Expand Down
Expand Up @@ -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;

Expand All @@ -13,8 +13,8 @@ public class GitHubSCMSourceRepositoryNameContributor extends GitHubRepositoryNa

@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;
Expand Down

0 comments on commit 93cc3f4

Please sign in to comment.