Skip to content

Commit

Permalink
Add hyperlink to failing downstream build (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
basil authored Jul 19, 2021
1 parent 774ddb6 commit 2bdcc94
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

package org.jenkinsci.plugins.workflow.support.steps.build;

import hudson.console.ModelHyperlinkNote;
import hudson.model.Run;
import javax.annotation.CheckForNull;
import jenkins.model.CauseOfInterruption;
Expand All @@ -48,7 +49,8 @@ public final class DownstreamFailureCause extends CauseOfInterruption {
@Override public String getShortDescription() {
Run<?, ?> downstream = getDownstreamBuild();
if (downstream != null) {
return downstream.getFullDisplayName() + " completed with status " + downstream.getResult() + " (propagate: false to ignore)";
// encodeTo(Run) calls getDisplayName, which does not include the project name.
return ModelHyperlinkNote.encodeTo("/" + downstream.getUrl(), downstream.getFullDisplayName()) + " completed with status " + downstream.getResult() + " (propagate: false to ignore)";
} else {
return "Downstream build was not stable (propagate: false to ignore)";
}
Expand Down

0 comments on commit 2bdcc94

Please sign in to comment.