diff --git a/misc/chrome/gophertool/gopher.js b/misc/chrome/gophertool/gopher.js index 686e2175f9..c09c4ef10c 100644 --- a/misc/chrome/gophertool/gopher.js +++ b/misc/chrome/gophertool/gopher.js @@ -3,7 +3,8 @@ // license that can be found in the LICENSE file. var numericRE = /^\d+$/; -var commitRE = /^(?:\d+:)?([0-9a-f]{6,20})$/; // e.g "8486:ab29d2698a47" or "ab29d2698a47" +var commitRE = /^(?:\d+:)?([0-9a-f]{6,40})$/; // e.g "8486:ab29d2698a47" or "ab29d2698a47" +var gerritChangeIdRE = /^I[0-9a-f]{4,40}$/; // e.g. Id69c00d908d18151486007ec03da5495b34b05f5 var pkgRE = /^[a-z0-9_\/]+$/; function urlForInput(t) { @@ -21,6 +22,10 @@ function urlForInput(t) { return "https://golang.org/cl/" + t; } + if (gerritChangeIdRE.test(t)) { + return "http://golang.org/cl/" + t; + } + var match = commitRE.exec(t); if (match) { return "https://golang.org/change/" + match[1]; diff --git a/misc/chrome/gophertool/popup.html b/misc/chrome/gophertool/popup.html index 8bb7795fac..9740406276 100644 --- a/misc/chrome/gophertool/popup.html +++ b/misc/chrome/gophertool/popup.html @@ -9,11 +9,13 @@
-issue, -codereview, -commit, or -pkg id/name: +issue, +codereview, +commit, or +pkg id/name: -Also: buildbots +Also: buildbots +Github +