is there an API, e.g. accessible via REST, by which you can get out some data about the authors / reviewers of patches out of Gerrit? The user interface communicates with the server in REST, but is it kind of stable and could be used outside of the GWT interface?
Is there a way except direct database access?
I'm thinking of querying per issue per patch set and getting the review data.
Has sb. implemented some stats tool about most active reviewers etc?
Thanks for your reply.
Kind regards
--
Steffen Gebert
TYPO3 v4 Core Team Member
TYPO3 .... inspiring people to share!
Get involved: http://typo3.org
> is there an API, e.g. accessible via REST, by which you can get out
> some data about the authors / reviewers of patches out of Gerrit? The
> user interface communicates with the server in REST, but is it kind of
> stable and could be used outside of the GWT interface?
Hmm, I don't think so.
> Is there a way except direct database access?
>
> I'm thinking of querying per issue per patch set and getting the
> review data.
>
> Has sb. implemented some stats tool about most active reviewers etc?
Take a look at the "query" SSH command.
--
Magnus Bäck Opinions are my own and do not necessarily
SW Configuration Manager represent the ones of my employer, etc.
Sony Ericsson
ssh -p 29418 us...@review.example.com gerrit \
query --all-approvals --format=JSON myproject status:open | \
head -n -1 | script_that_can_read_the_json
> --
> To unsubscribe, email repo-discuss...@googlegroups.com
> More info at http://groups.google.com/group/repo-discuss?hl=en
>
Any plans on making this available through HTTP? It's no problem using the ssh-connection but HTTP would be nice :)
// peter
Query is available over HTTP in a more standardized format than what
the web UI uses:
http://review.example.com/query?q=status:open+project:tools/gerrit.git
This produces JSON, in the same format as the SSH query command. Its
the same backend code, the only difference is the parameter parsing. I
can't remember if there is an HTTP query parameter to match to the
options like --all-approvals from SSH. If not it would be trivial to
add, the SSH command is just poking those values down to the backend
code. The HTTP code would just need to do the same thing.
I wouldn't try to use any other JSON interface over HTTP for
integration. The interfaces the web UI uses are considered private and
get modified all of the time. Gerrit 2.2.x uses some pretty different
structures from 2.1.x and we don't promise to retain compatibility.