gerrit/

directory
v0.0.0-...-beee144 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 29, 2020 License: Apache-2.0

README

Gerrit

Gerrit is a free, web-based team code collaboration tool.

Adapter

Reporter

Client

We have a gerrit-client package that provides a thin wrapper around
andygrunwald/go-gerrit, which is a go client library for accessing the Gerrit Code Review REST API

You can create a client instance by pass in a map of instance-name:project-ids, and pass in an oauth token path to start the client, like:

projects := map[string][]string{
	"foo.googlesource.com": {
		"project-bar",
		"project-baz",
	},
}

c, err := gerrit.NewClient(projects)
if err != nil {
	// handle error
}
c.Start(cookiefilePath)

The client will try to refetch token from the path every 10 minutes.

You should also utilize grandmatriarch to generate a token from a passed-in service account credential.

If you need extra features, feel free to introduce new gerrit API functions to the client package.

Adapter

The adapter package implements a controller that is periodically polling gerrit, and triggering presubmit and postsubmit jobs based on your prow config.

Caveat

The gerrit adapter currently does not support gerrit hooks, If you need them, please send us a PR to support them :-)

Directories

Path Synopsis
Package adapter implements a controller that interacts with gerrit instances
Package adapter implements a controller that interacts with gerrit instances
Package client implements a client that can handle multiple gerrit instances derived from https://github.com/andygrunwald/go-gerrit
Package client implements a client that can handle multiple gerrit instances derived from https://github.com/andygrunwald/go-gerrit

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL