Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework README: Changed godoc links, Renamed Go(lang) to Go, added make commands #84

Merged
merged 1 commit into from
Dec 31, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 16 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
# go-gerrit

[![GoDoc](https://godoc.org/github.com/andygrunwald/go-gerrit?status.svg)](https://godoc.org/github.com/andygrunwald/go-gerrit)
[![GoDoc](https://godoc.org/github.com/andygrunwald/go-gerrit?status.svg)](https://pkg.go.dev/github.com/andygrunwald/go-gerrit)
[![Go Report Card](https://goreportcard.com/badge/github.com/andygrunwald/go-gerrit)](https://goreportcard.com/report/github.com/andygrunwald/go-gerrit)

go-gerrit is a [Go(lang)](https://golang.org/) client library for accessing the [Gerrit Code Review](https://www.gerritcodereview.com/) API.
go-gerrit is a [Go](https://golang.org/) client library for accessing the [Gerrit Code Review](https://www.gerritcodereview.com/) API.

![go-gerrit - Go(lang) client/library for Gerrit Code Review](./img/logo.png "go-gerrit - Go(lang) client/library for Gerrit Code Review")
![go-gerrit - Go client/library for Gerrit Code Review](./img/logo.png "go-gerrit - Go client/library for Gerrit Code Review")

## Features

* [Authentication](https://godoc.org/github.com/andygrunwald/go-gerrit#AuthenticationService) (HTTP Basic, HTTP Digest, HTTP Cookie)
* [Authentication](https://pkg.go.dev/github.com/andygrunwald/go-gerrit#AuthenticationService) (HTTP Basic, HTTP Digest, HTTP Cookie)
* Every API Endpoint like Gerrit
* [/access/](https://godoc.org/github.com/andygrunwald/go-gerrit#AccessService)
* [/accounts/](https://godoc.org/github.com/andygrunwald/go-gerrit#AccountsService)
* [/changes/](https://godoc.org/github.com/andygrunwald/go-gerrit#ChangesService)
* [/config/](https://godoc.org/github.com/andygrunwald/go-gerrit#ConfigService)
* [/groups/](https://godoc.org/github.com/andygrunwald/go-gerrit#GroupsService)
* [/plugins/](https://godoc.org/github.com/andygrunwald/go-gerrit#PluginsService)
* [/projects/](https://godoc.org/github.com/andygrunwald/go-gerrit#ProjectsService)
* [/access/](https://pkg.go.dev/github.com/andygrunwald/go-gerrit#AccessService)
* [/accounts/](https://pkg.go.dev/github.com/andygrunwald/go-gerrit#AccountsService)
* [/changes/](https://pkg.go.dev/github.com/andygrunwald/go-gerrit#ChangesService)
* [/config/](https://pkg.go.dev/github.com/andygrunwald/go-gerrit#ConfigService)
* [/groups/](https://pkg.go.dev/github.com/andygrunwald/go-gerrit#GroupsService)
* [/plugins/](https://pkg.go.dev/github.com/andygrunwald/go-gerrit#PluginsService)
* [/projects/](https://pkg.go.dev/github.com/andygrunwald/go-gerrit#ProjectsService)
* Supports optional plugin APIs such as
* events-log - [About](https://gerrit.googlesource.com/plugins/events-log/+/master/src/main/resources/Documentation/about.md), [REST API](https://gerrit.googlesource.com/plugins/events-log/+/master/src/main/resources/Documentation/rest-api-events.md)

Expand All @@ -36,20 +36,18 @@ $ go get github.com/andygrunwald/go-gerrit
**Tests Only**

```sh
$ cd $GOPATH/src/github.com/andygrunwald/go-gerrit
$ go test -v
$ make test
```

**Checks, Tests, Linters, etc**

```sh
$ cd $GOPATH/src/github.com/andygrunwald/go-gerrit
$ make
$ make vet staticcheck
```

## API / Usage

Please have a look at the [GoDoc documentation](https://godoc.org/github.com/andygrunwald/go-gerrit) for a detailed API description.
Please have a look at the [GoDoc documentation](https://pkg.go.dev/github.com/andygrunwald/go-gerrit) for a detailed API description.

The [Gerrit Code Review - REST API](https://gerrit-review.googlesource.com/Documentation/rest-api.html) was the base document.

Expand Down Expand Up @@ -98,7 +96,7 @@ If you get an `401 Unauthorized`, check your Account Settings and have a look at

#### HTTP Cookie

Some Gerrit instances hosted like the one hosted googlesource.com (e.g. [Go(lang)](https://go-review.googlesource.com/), [Android](https://android-review.googlesource.com/) or [Gerrit](https://gerrit-review.googlesource.com/)) support HTTP Cookie authentication.
Some Gerrit instances hosted like the one hosted googlesource.com (e.g. [Go](https://go-review.googlesource.com/), [Android](https://android-review.googlesource.com/) or [Gerrit](https://gerrit-review.googlesource.com/)) support HTTP Cookie authentication.

You need the cookie name and the cookie value.
You can get them by click on "Settings > HTTP Password > Obtain Password" in your Gerrit instance.
Expand Down Expand Up @@ -128,7 +126,7 @@ We will be happy to answer them.
## Examples

Further a few examples how the API can be used.
A few more examples are available in the [GoDoc examples section](https://godoc.org/github.com/andygrunwald/go-gerrit#pkg-examples).
A few more examples are available in the [GoDoc examples section](https://pkg.go.dev/github.com/andygrunwald/go-gerrit#pkg-examples).

### Get version of Gerrit instance

Expand Down