Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 337087

Summary: [upstream] retrieve Gerrit configuration using Gerrit API
Product: z_Archived Reporter: Steffen Pingel <steffen.pingel>
Component: MylynAssignee: Project Inbox <mylyn-triaged>
Status: CLOSED MOVED QA Contact:
Severity: enhancement    
Priority: P4 CC: edwin.kempin, ingo, sop
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
URL: http://code.google.com/p/gerrit/issues/detail?id=848
Whiteboard:

Description Steffen Pingel CLA 2011-02-14 01:08:44 EST
The Gerrit configuration which is encoded in a JavaScript variable called "gerrit_hostpagedata" in the Gerrit web sites includes valuable configuration details such as approval types. This configuration needs to be made available to the Gerrit connector somehow.
Comment 1 Steffen Pingel CLA 2011-02-14 01:10:25 EST
I couldn't find an RPC service that exposes the configuration details. Did I miss something?
Comment 2 Shawn Pearce CLA 2011-02-14 10:02:33 EST
Nope, its not available except in the host HTML page.

Gerrit will need to add this as a new service to expose it in plain JSON for Mylyn.
Comment 3 Steffen Pingel CLA 2011-02-14 16:06:07 EST
Thanks for confirming that. What is the best way to approach it? Should I file a bug against Gerrit to propose that change?
Comment 4 Shawn Pearce CLA 2011-02-14 17:40:00 EST
(In reply to comment #3)
> Thanks for confirming that. What is the best way to approach it? Should I file
> a bug against Gerrit to propose that change?

Yes, otherwise it won't ever get done.  :-(
Comment 5 Steffen Pingel CLA 2011-02-17 17:56:45 EST
I have filed an enhancement request against Gerrit: http://code.google.com/p/gerrit/issues/detail?id=848 .
Comment 6 Miles Parker CLA 2013-04-18 19:01:59 EDT
Steffen, do we have what you wanted now with: bug 404933?
Comment 7 Steffen Pingel CLA 2013-04-20 05:35:37 EDT
AFAIK, the Gerrit connector still relies on parsing JavaScript to obtain the configuration (see GerritClient.refreshConfig()). At this point, we don't have any other API to obtain the data we need.
Comment 8 Miles Parker CLA 2013-04-22 18:26:08 EDT
(In reply to comment #7)
> AFAIK, the Gerrit connector still relies on parsing JavaScript to obtain the
> configuration (see GerritClient.refreshConfig()). At this point, we don't have
> any other API to obtain the data we need.

That's correct, and is implicated in bug 406256. It would be really nice to replace this.
Comment 9 Miles Parker CLA 2014-12-23 19:30:06 EST
I believe that this was addressed a long time ago incidentally. Please reopen if I'm wrong about that.
Comment 10 Sam Davis CLA 2015-01-06 14:44:07 EST
Seems like this is still parsing JavaScript to get the config. The Gerrit bug is still open.
Comment 11 Miles Parker CLA 2015-01-06 15:34:13 EST
Where is that happening exactly, Sam?
Comment 12 Sam Davis CLA 2015-01-06 19:29:33 EST
GerritHtmlProcessor I think.
Comment 13 Eclipse Webmaster CLA 2022-11-15 11:45:08 EST
Mylyn has been restructured, and our issue tracking has moved to GitHub [1].

We are closing ~14K Bugzilla issues to give the new team a fresh start. If you feel that this issue is still relevant, please create a new one on GitHub.

[1] https://github.com/orgs/eclipse-mylyn