gerrit-rest-java-client
======================
[![Linux Build](https://travis-ci.org/uwolfer/gerrit-rest-java-client.svg?branch=master)](https://travis-ci.org/uwolfer/gerrit-rest-java-client)
[![Windows Build](https://ci.appveyor.com/api/projects/status/ctm64o74lxdri26s/branch/master?svg=true)](https://ci.appveyor.com/project/uwolfer/gerrit-rest-java-client/branch/master)
[![Coverage Status](https://img.shields.io/coveralls/uwolfer/gerrit-rest-java-client.svg)](https://coveralls.io/r/uwolfer/gerrit-rest-java-client)
[![Quality Gate](https://sonarcloud.io/api/project_badges/measure?project=com.urswolfer.gerrit.client.rest%3Agerrit-rest-java-client&metric=alert_status)](https://sonarcloud.io/dashboard/index/com.urswolfer.gerrit.client.rest:gerrit-rest-java-client)
[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=com.urswolfer.gerrit.client.rest%3Agerrit-rest-java-client&metric=sqale_rating)](https://sonarcloud.io/dashboard/index/com.urswolfer.gerrit.client.rest:gerrit-rest-java-client)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.urswolfer.gerrit.client.rest/gerrit-rest-java-client/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.urswolfer.gerrit.client.rest/gerrit-rest-java-client)
Introduction
-----------
Java implementation of the [Gerrit Code Review Tool] REST API.
Only Gerrit 2.6 or newer is supported (missing / incomplete REST API in older versions).
This implementation is used for example as base for the [Gerrit IntelliJ Plugin].
Many different authentication-methods are supported (HTTP basic, HTTP digest, LDAP with form,
HTTP password from Gerrit setting, ...).
[Gerrit Code Review Tool]: https://www.gerritcodereview.com/
[Gerrit IntelliJ Plugin]: https://github.com/uwolfer/gerrit-intellij-plugin
Usage
-------
This library implements <code>[com.google.gerrit.extensions.api.GerritApi]</code>.
You just need a few lines to get it working:
```java
GerritRestApiFactory gerritRestApiFactory = new GerritRestApiFactory();
GerritAuthData.Basic authData = new GerritAuthData.Basic("http://localhost:8080");
// or: authData = new GerritAuthData.Basic("https://example.com/gerrit", "user", "password");
GerritApi gerritApi = gerritRestApiFactory.create(authData);
List<ChangeInfo> changes = gerritApi.changes().query("status:merged").withLimit(10).get();
```
If you like to write a script instead of a full Java application, you might want to use [Groovy].
There is a [basic Groovy example] available.
_Note:_ It is not guaranteed that all interfaces are implemented. If an implementation is missing, you get a
<code>com.google.gerrit.extensions.restapi.NotImplementedException</code>. Feel free to implement it and create a pull
request at GitHub - it is quite easy! :)
_Note:_ The source of <code>com.google.gerrit.extensions</code> is included in this repository at the
moment because not all extensions to this API are merged into Gerrit repository yet.
[com.google.gerrit.extensions.api.GerritApi]: https://gerrit.googlesource.com/gerrit/+/HEAD/gerrit-extension-api/src/main/java/com/google/gerrit/extensions/api/GerritApi.java
[Groovy]: http://www.groovy-lang.org/
[basic Groovy example]: https://github.com/uwolfer/gerrit-rest-java-client/blob/master/examples/Basic.groovy
Maven Artifact
--------------
Releases are available with Maven:
```xml
<dependency>
<groupId>com.urswolfer.gerrit.client.rest</groupId>
<artifactId>gerrit-rest-java-client</artifactId>
<version>0.9.3</version>
</dependency>
```
Android Support
---------------
Apache HttpClient causes problems on Android platform. There is a workaround by using [HttpClient for Android].
Android support builds are not officially released, but you should be able to create your own build by using the
[httpclient-android branch]. You probably want to merge master branch into this branch before building it.
[HttpClient for Android]: https://hc.apache.org/httpcomponents-client-4.3.x/android-port.html
[httpclient-android branch]: https://github.com/uwolfer/gerrit-rest-java-client/tree/httpclient-android
Dependencies
------------
This library depends on [Apache HttpClient], [Gson] and [Guava].
[Apache HttpClient]: https://hc.apache.org/httpcomponents-client-ga/
[Gson]: https://github.com/google/gson
[Guava]: https://github.com/google/guava
Your Support
------------
If you like this library, you can support it:
* Star it: [Star it at GitHub](https://github.com/uwolfer/gerrit-rest-java-client). GitHub account required.
* Improve it: Report bugs or feature requests. Or even fix / implement them by yourself - everything is open source!
* Donate: You can find donation-possibilities at the bottom of this file.
Donations
--------
If you like this work, you can support it with
[this donation link](https://www.paypal.com/webscr?cmd=_s-xclick&hosted_button_id=8F2GZVBCVEDUQ).
If you don't like Paypal (Paypal takes 2.9% plus $0.30 per transaction fee from your donation), please contact me.
Please only use the link from github.com/uwolfer/gerrit-intellij-plugin to verify that it is correct.
Copyright and license
--------------------
Copyright 2013 - 2018 Urs Wolfer
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this work except in compliance with the License.
You may obtain a copy of the License in the LICENSE file, or at:
[http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
没有合适的资源?快使用搜索试试~ 我知道了~
gerrit-rest-java-client:用于Gerrit代码审查的Java REST客户端
共399个文件
java:342个
json:39个
editorconfig:3个
需积分: 44 3 下载量 148 浏览量
2021-01-30
01:40:56
上传
评论
收藏 441KB ZIP 举报
温馨提示
gerrit-rest-java-client 介绍 REST API的Java实现。 仅支持Gerrit 2.6或更高版本(旧版本中缺少/不完整的REST API)。 例如,此实现用作。 支持许多不同的身份验证方法(HTTP基本,HTTP摘要,带形式的LDAP,来自Gerrit设置的HTTP密码,...)。 用法 该库实现 。 您只需要几行就可以使它工作: GerritRestApiFactory gerritRestApiFactory = new GerritRestApiFactory (); GerritAuthData . Basic authData = new GerritAuthData . Basic ( " http://localhost:8080 " ); // or: authData = new GerritAuthData.Basic("https://example.com/gerrit", "user", "password"); GerritApi gerritApi = gerritRestApiFactory . create(aut
资源详情
资源评论
资源推荐
收起资源包目录
gerrit-rest-java-client:用于Gerrit代码审查的Java REST客户端 (399个子文件)
commit-msg 22B
.editorconfig 242B
.editorconfig 25B
.editorconfig 25B
.gitattributes 15B
.gitattributes 14B
.gitignore 234B
Basic.groovy 896B
index.html 4KB
invalid_json 68B
ChangeApiRestClientTest.java 36KB
RevisionApiRestClientTest.java 29KB
GerritRestClient.java 22KB
ChangeApi.java 21KB
GerritRestClientTest.java 18KB
ChangeApiRestClient.java 15KB
ChangesRestClientTest.java 13KB
GroupsRestClientTest.java 13KB
RevisionApi.java 12KB
ProjectsRestClientTest.java 12KB
ProjectApi.java 12KB
RevisionApiRestClient.java 11KB
AccountApi.java 11KB
GroupApiRestClientTest.java 11KB
ProjectApiRestClientTest.java 10KB
ChangeEditApi.java 10KB
CommentsParserTest.java 9KB
Groups.java 8KB
GroupApi.java 8KB
BinaryResult.java 8KB
FileApiRestClientTest.java 7KB
Projects.java 7KB
Accounts.java 7KB
Changes.java 7KB
ProjectApiRestClient.java 7KB
ReviewInput.java 7KB
GroupsRestClient.java 7KB
ChangesRestClient.java 6KB
GroupApiRestClient.java 6KB
BranchApiRestClientTest.java 6KB
DraftsApiRestClientTest.java 6KB
CommitInfosParserTest.java 6KB
GerritApiImpl.java 6KB
AccountsRestClientTest.java 6KB
ChangesParserTest.java 6KB
GeneralPreferencesInfo.java 5KB
FileApiRestClient.java 5KB
GerritAuthData.java 5KB
FileApi.java 4KB
ProjectsRestClient.java 4KB
ChangeInfoBuilder.java 4KB
Comment.java 4KB
AccountApiRestClient.java 4KB
RealServerTest.java 4KB
GerritAssert.java 4KB
AccountInfo.java 4KB
TagApiRestClientTest.java 4KB
AuthInfo.java 4KB
ProjectsParserTest.java 4KB
ChangeStatus.java 4KB
Server.java 4KB
GroupsParserTest.java 4KB
GerritRestClientBuilder.java 3KB
DraftApiRestClient.java 3KB
Plugins.java 3KB
ChangeInfo.java 3KB
AccountApiRestClientTest.java 3KB
ConfigInfo.java 3KB
ListChangesOptionByVersion.java 3KB
AuthType.java 3KB
BranchApiRestClient.java 3KB
DiffInfoBuilder.java 3KB
LoginCache.java 3KB
StandardKeyEncoder.java 3KB
RestClient.java 3KB
AccountsRestClient.java 3KB
ReviewerInfosParserTest.java 3KB
RobotCommentInfoBuilder.java 3KB
DiffPreferencesInfo.java 3KB
ReviewerApiRestClientTest.java 3KB
BranchInfoParserTest.java 3KB
TagInfoParserTest.java 3KB
ChangeEditApiRestClient.java 3KB
PreemptiveAuthHttpRequestInterceptor.java 3KB
DiffInfo.java 3KB
ConsistencyCheckInfo.java 3KB
ListChangesOption.java 3KB
CommitInfosParser.java 3KB
AccountExternalIdInfo.java 3KB
ProjectWatchInfo.java 3KB
SshKeyParserTest.java 3KB
GroupAuditEventInfo.java 3KB
AccountsParserTest.java 3KB
ServerRestClientTest.java 2KB
AddReviewerResult.java 2KB
CommentsParser.java 2KB
GroupsParser.java 2KB
ApprovalInfo.java 2KB
ReviewerApiRestClient.java 2KB
TagInfo.java 2KB
共 399 条
- 1
- 2
- 3
- 4
BinaryBrewmaster
- 粉丝: 16
- 资源: 4598
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0