From: James Moger Date: Thu, 14 Nov 2013 01:16:59 +0000 (-0500) Subject: Tweak pull request ref display X-Git-Tag: v1.4.0~208 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=9de1a56ac4a888289cd758d033cb02ece2bbca76;p=gitblit.git Tweak pull request ref display Change-Id: I07d05eb45e40c233facfa3674f9528d2bda4b5d5 --- diff --git a/src/main/java/com/gitblit/wicket/panels/RefsPanel.java b/src/main/java/com/gitblit/wicket/panels/RefsPanel.java index 1a763119..7a16f4a2 100644 --- a/src/main/java/com/gitblit/wicket/panels/RefsPanel.java +++ b/src/main/java/com/gitblit/wicket/panels/RefsPanel.java @@ -122,11 +122,13 @@ public class RefsPanel extends Panel { cssClass = "otherRef"; } else if (name.startsWith(Constants.R_PULL)) { // Pull Request ref - name = "pull #" + name.substring(Constants.R_PULL.length()); - if (name.endsWith("/head")) { + String num = name.substring(Constants.R_PULL.length()); + if (num.endsWith("/head")) { // strip pull request head from name - name = name.substring(0, name.length() - "/head".length()); + num = num.substring(0, num.length() - "/head".length()); } + name = "pr #" + num; + tooltip = "pull request #" + num; cssClass = "pullRef"; } else if (name.startsWith(Constants.R_REMOTES)) { // remote branch