]> source.dussan.org Git - gitblit.git/commitdiff
Tweak pull request ref display
authorJames Moger <james.moger@gmail.com>
Thu, 14 Nov 2013 01:16:59 +0000 (20:16 -0500)
committerJames Moger <james.moger@gmail.com>
Thu, 14 Nov 2013 01:16:59 +0000 (20:16 -0500)
Change-Id: I07d05eb45e40c233facfa3674f9528d2bda4b5d5

src/main/java/com/gitblit/wicket/panels/RefsPanel.java

index 1a7631195a02b8687ee8f0dfbe7c311b7177f51f..7a16f4a28bb25bdd4e04826cbdfefdebe00d2c73 100644 (file)
@@ -122,11 +122,13 @@ public class RefsPanel extends Panel {
                                        cssClass = "otherRef";\r
                                } else if (name.startsWith(Constants.R_PULL)) {\r
                                        // Pull Request ref\r
-                                       name = "pull #" + name.substring(Constants.R_PULL.length());\r
-                                       if (name.endsWith("/head")) {\r
+                                       String num = name.substring(Constants.R_PULL.length());\r
+                                       if (num.endsWith("/head")) {\r
                                                // strip pull request head from name\r
-                                               name = name.substring(0, name.length() - "/head".length());\r
+                                               num = num.substring(0, num.length() - "/head".length());\r
                                        }\r
+                                       name = "pr #" + num;\r
+                                       tooltip = "pull request #" + num;\r
                                        cssClass = "pullRef";\r
                                } else if (name.startsWith(Constants.R_REMOTES)) {\r
                                        // remote branch\r