2016-01-20 97 views
2

首先,我对碎片有一些理解。使用REST API查询Gerrit?

我要的是通过使用格里特变更网址: - http://review.xx.yy.com/gerrit/#/c/240262/

我想要得到的格里特服务器和格里特的Refspec的URL(参/修改/ ..)由使用REST API(使用curl)或任何其他git命令。

可能吗?

如果问题不明确,请评论/编辑。

谢谢。

+0

我真的不明白你在问什么,但是你可以通过使用[git review](https://github.com/openstack-infra/git-review)工具来促进与gerrit的沟通。例如。你可以'git review -d 240262'下载最新的补丁集。 – fracz

回答

3

Gerrit有一个可以查询的REST API。

要获得information about the Gerrit server你可以使用:如果你想query change-sets你可以用这样的形式

curl -i -H "Accept: application/json" http://review.xx.yy/gerrit/config/server/info 

http://review.xx.yy.com/gerrit/changes/?q=owner:johndoe 

http://review.xx.yy.com/gerrit/config/server/info 

您可以使用卷曲这样

以下是Gerrit的REST API文档:https://review.typo3.org/Documentation/rest-api.html