From: Shenghou Ma Date: Wed, 10 Dec 2014 00:41:52 +0000 (-0500) Subject: misc/chrome/gophertool: update for the git/gerrit transition X-Git-Tag: go1.5beta1~2607 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=fc71d7b8ca9a911ad670ec56570fa90a3c4c76f5;p=gostls13.git misc/chrome/gophertool: update for the git/gerrit transition Change-Id: I7b9601ae6e1cfb18ef79a7b189aa7e689c0fe942 Reviewed-on: https://go-review.googlesource.com/1621 Reviewed-by: Andrew Gerrand Reviewed-by: Brad Fitzpatrick --- 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 +