ownersclient

package
v1.9.3 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// OwnersURLFmt specifies a format for owners URL.
	OwnersURLFmt = "%s/repos/%s/%s/pulls/%d/owners"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Owners

type Owners struct {
	Committers []string `json:"committers,omitempty"`
	Reviewers  []string `json:"reviewers,omitempty"`
	NeedsLgtm  int      `json:"needsLGTM,omitempty"`
}

Owners contains owners and the number of lgtm required by PR.

type OwnersClient

type OwnersClient struct {
	// Client is a HTTP client to request reviewers.
	Client *http.Client
}

OwnersClient for load PR's reviewers.

func (*OwnersClient) LoadOwners

func (rc *OwnersClient) LoadOwners(ownersURL string,
	org, repoName string, number int) (*Owners, error)

LoadOwners returns owners and needs lgtm from URL of pull request owners.

type OwnersLoader

type OwnersLoader interface {
	LoadOwners(ownersURL string, org,
		repoName string, number int) (*Owners, error)
}

OwnersLoader load PR's reviewers.

type OwnersResponse

type OwnersResponse struct {
	Data    Owners `json:"data,omitempty"`
	Message string `json:"message,omitempty"`
}

OwnersResponse specifies the response to the request to get owners.

Jump to

Keyboard shortcuts

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