Skip to content

Commit

Permalink
Remove icon from reference link as it is broken in core again.
Browse files Browse the repository at this point in the history
  • Loading branch information
uhafner committed Feb 26, 2024
1 parent 1d1cefd commit 0ff47bf
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

import hudson.model.Run;

import io.jenkins.plugins.forensics.reference.ReferenceBuild;
import io.jenkins.plugins.util.QualityGateStatus;

/**
Expand Down Expand Up @@ -155,6 +156,18 @@ public boolean isResetQualityGateVisible() {
return analysisResult.getReferenceBuild();
}

/**
* Renders the reference build as an HTML link.
*
* @return the reference build
* @see #getReferenceBuild()
*/
@SuppressWarnings("unused") // Called by jelly view
public String getReferenceBuildLink() {
return ReferenceBuild.getReferenceBuildLink(
analysisResult.getReferenceBuild().map(Run::getExternalizableId).orElse("-"));
}

public boolean isZeroIssuesHighscore() {
return getNoIssuesSinceBuild() > 0 && analysisResult.getOwner().getNumber() > getNoIssuesSinceBuild();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
<j:set var="r" value="${s.referenceBuild.get()}"/>
<li>
Reference build:
<t:buildLink jobName="${r.parent.displayName}" job="${r.parent}" number="${r.number}"/>
<j:out value="${s.referenceBuildLink}"/>
</li>
</j:if>
<j:if test="${s.qualityGateStatus.name() != 'INACTIVE'}">
Expand Down

0 comments on commit 0ff47bf

Please sign in to comment.