1
0
mirror of https://github.com/golang/go synced 2024-11-05 16:26:11 -07:00
go/godoc/redirect
Dmitri Shuralyov aa03309574 godoc/redirect: display Gerrit/Rietveld CL disambiguation page when needed
For CL numbers that are determined to be Rietveld CLs, instead of
immediately redirecting, check whether a Gerrit CL with the same
number also exists. Do so by querying the Gerrit API and caching
the existing CLs. If both exist, display a very simple disambiguation
HTML page.

Cache Gerrit CLs that exist, to avoid querying the remote API server
more than once per CL. We can't cache Gerrit CLs that don't exist,
since they might get created in the future.

Fixes golang/go#28836

Change-Id: I08c32dc82a0136788337c5c32028e87428e8d81e
Reviewed-on: https://go-review.googlesource.com/c/157197
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-01-10 01:58:56 +00:00
..
hash.go godoc/redirect: support loading hg->git change map from a file 2014-12-15 06:48:23 +00:00
redirect_test.go godoc/redirect: improve Rietveld CL heuristic 2018-11-16 19:35:47 +00:00
redirect.go godoc/redirect: display Gerrit/Rietveld CL disambiguation page when needed 2019-01-10 01:58:56 +00:00
rietveld.go godoc/redirect: improve Rietveld CL heuristic 2018-11-16 19:35:47 +00:00