Navigation Menu

Skip to content

Commit

Permalink
[JENKINS-32749] @amuniz's comments were addressed
Browse files Browse the repository at this point in the history
  • Loading branch information
Manuel Recena committed Feb 16, 2016
1 parent 4976cc2 commit 15055a6
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 17 deletions.
Expand Up @@ -179,18 +179,10 @@ private void add(TaskListener listener, SCMSourceObserver observer, GHRepository
throw new InterruptedException();
}
SCMSourceObserver.ProjectObserver projectObserver = observer.observe(name);
for (GitHubSCMSourceAddition addition : ExtensionList.lookup(GitHubSCMSourceAddition.class)) {
for (SCMSource source : addition.sourcesFor(apiUri, checkoutCredentialsId, scanCredentialsId, repoOwner, name)) {
projectObserver.addSource(source);
}
}
projectObserver.addSource(new GitHubSCMSource(null, apiUri, checkoutCredentialsId, scanCredentialsId, repoOwner, name));
projectObserver.complete();
}

public interface GitHubSCMSourceAddition extends ExtensionPoint {
List<? extends SCMSource> sourcesFor(String apiUri, String checkoutCredentialsId, String scanCredentialsId, String repoOwner, String repository);
}

@Extension public static class DescriptorImpl extends SCMNavigatorDescriptor {

@Override public String getDisplayName() {
Expand Down
Expand Up @@ -490,10 +490,4 @@ public ListBoxModel doFillRepositoryItems(@AncestorInPath SCMSourceOwner context

}

@Extension public static class GitHubSCMSourceAddition implements GitHubSCMNavigator.GitHubSCMSourceAddition {
@Override public List<? extends SCMSource> sourcesFor(String apiUri, String checkoutCredentialsId, String scanCredentialsId, String repoOwner, String repository) {
return Collections.singletonList(new GitHubSCMSource(null, apiUri, checkoutCredentialsId, scanCredentialsId, repoOwner, repository));
}
}

}
@@ -1,3 +1,3 @@
<div>
<p>Credentials used to scan branches and check out sources</p>
<p>Credentials used to <strong>scan</strong> branches and pull requests, <strong>check</strong> out sources and <strong>mark</strong> commit statuses</p>
</div>
@@ -1,3 +1,3 @@
<div>
<p>Credentials used to scan branches and pull requests and check out sources.</p>
<p>Credentials used to <strong>scan</strong> branches and pull requests, <strong>check</strong> out sources and <strong>mark</strong> commit statuses</p>
</div>

0 comments on commit 15055a6

Please sign in to comment.