Skip to content
Permalink
Browse files

[JENKINS-40255] Changed behavior for WorkflowJob.getSCMs(), now it ch…

…ecks for successful build first.
  • Loading branch information...
jonsten committed Dec 7, 2016
1 parent 139ac7e commit 16b97e4ec4b03f9b3cb9793659d818ceec94eda7
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowJob.java
@@ -537,7 +537,10 @@ public void replaceAction(Action a) {
}

@Override public Collection<? extends SCM> getSCMs() {
WorkflowRun b = getLastCompletedBuild();
WorkflowRun b = getLastSuccessfulBuild();
if (b == null) {
b = getLastCompletedBuild();
}
if (b == null) {
return Collections.emptySet();
}

0 comments on commit 16b97e4

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.