Skip to content

Commit

Permalink
Merge pull request #126 from jglick/export-JENKINS-50777
Browse files Browse the repository at this point in the history
[JENKINS-50777] Export the SCMSource(s) from a MultiBranchProject
  • Loading branch information
jglick committed Apr 20, 2018
2 parents e53a2a9 + c1bb523 commit bd62524
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -66,7 +66,7 @@

<properties>
<jenkins.version>1.642.3</jenkins.version>
<scm-api.version>2.2.6</scm-api.version>
<scm-api.version>2.2.7</scm-api.version>
<git-plugin.version>3.3.0</git-plugin.version>
</properties>

Expand Down
4 changes: 4 additions & 0 deletions src/main/java/jenkins/branch/BranchSource.java
Expand Up @@ -36,13 +36,16 @@

import java.util.List;
import org.kohsuke.stapler.DataBoundSetter;
import org.kohsuke.stapler.export.Exported;
import org.kohsuke.stapler.export.ExportedBean;

/**
* A source of branches, which consists of a source and a strategy for creating properties of the branches from this
* source.
*
* @author Stephen Connolly
*/
@ExportedBean
public class BranchSource extends AbstractDescribableImpl<BranchSource> {
/**
* The source.
Expand Down Expand Up @@ -87,6 +90,7 @@ private Object readResolve() {
*
* @return the source.
*/
@Exported
@NonNull
public SCMSource getSource() {
return source;
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/jenkins/branch/MultiBranchProject.java
Expand Up @@ -114,6 +114,7 @@
import org.kohsuke.accmod.restrictions.NoExternalUse;
import org.kohsuke.stapler.StaplerRequest;
import org.kohsuke.stapler.StaplerResponse;
import org.kohsuke.stapler.export.Exported;

/**
* Abstract base class for multiple-branch based projects.
Expand Down Expand Up @@ -365,6 +366,7 @@ public synchronized void setProjectFactory(BranchProjectFactory<P, R> projectFac
*
* @return the sources of branches.
*/
@Exported
@NonNull
public List<BranchSource> getSources() {
if (sources != null) {
Expand Down

0 comments on commit bd62524

Please sign in to comment.