Perschka / gitiles

Automatically exported from code.google.com/p/gitiles
0 stars 0 forks source link

Add JSON and TEXT links to more pages #27

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Ideally, we would offer JSON and TEXT links for every view for which there is 
JSON or TEXT available. Doing this manually in the templates is easy enough but 
is surely the sort of thing we would forget to do. It might be nice to have it 
happen automatically, in which case we would need to teach BaseServlet 
implementations how to advertise which formats they support.

Original issue reported on code.google.com by dborowitz@google.com on 11 Apr 2013 at 7:31

GoogleCodeExporter commented 8 years ago
FWIW, this would be very helpful for the chrome team.  I recently wrote a tool 
which needed to look up commit messages (i.e. from 
https://chromium.googlesource.com/chromium/blink/+/master). I ended up writing 
a regex to parse gitiles html.

Original comment by ilevy@chromium.org on 6 May 2013 at 1:06

GoogleCodeExporter commented 8 years ago
Thanks for the suggestion, we are more than happy to prioritize which JSON 
endpoints we implement first based on Chrome's priorities :)

That said this bug is specifically about the JSON and TEXT link badges you see 
at the bottom of https://chromium.googlesource.com/. Currently we *only* put 
those links on /, even though JSON and/or TEXT are available for more pages.

Original comment by dborowitz@google.com on 6 May 2013 at 9:32

GoogleCodeExporter commented 8 years ago
Having json listing for the recent commits, is the only issue (that I'm aware 
of) preventing us from moving Blink's "garden-o-matic" tool to a server:
https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/To
ols/GardeningServer/scripts/svn-log.js&q=svn-log&sq=package:chromium&l=100

I looked at adding it earlier this summer, then got distracted with other 
things.  Eventually I'll get back to it.

Original comment by esei...@chromium.org on 5 Sep 2013 at 4:26

GoogleCodeExporter commented 8 years ago
re: #3
I don't know if this is new since your comment, but does this work for your 
json recent commits listing:
https://chromium.googlesource.com/chromium/blink/+log/HEAD~5..HEAD?format=JSON

Original comment by mmoss@chromium.org on 15 Feb 2014 at 12:57

GoogleCodeExporter commented 8 years ago
Is it expected that the contents of these JSON links start with ]}' ?  eg to 
pick one at random: 
https://android.googlesource.com/device/ti/panda/?format=JSON contains the 
following:

]}'
{
  "name": "device/ti/panda",
  "clone_url": "https://android.googlesource.com/device/ti/panda"
}

Original comment by most...@opera.com on 4 Jan 2016 at 9:23

GoogleCodeExporter commented 8 years ago
Yes. It's there to prevent using eval. See 
http://stackoverflow.com/questions/3146798/why-do-people-put-code-like-throw-1-d
ont-be-evil-and-for-in-front-of

Original comment by fbeauf...@chromium.org on 4 Jan 2016 at 9:29

GoogleCodeExporter commented 8 years ago
The json and txt links now seem to appear on all pages on 
chromium.googlesource.com, so maybe this bug can be closed?

But that said, they appear but 404 on pages for individual files (e.g. 
https://chromium.googlesource.com/skia/+/master/OWNERS).

Original comment by aga...@google.com on 27 Feb 2016 at 2:37