githubrepo

package
v2.2.8 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2021 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Package githubrepo implements clients.RepoClient for GitHub.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateGithubRepoClient

func CreateGithubRepoClient(ctx context.Context, logger *zap.Logger) clients.RepoClient

CreateGithubRepoClient returns a Client which implements RepoClient interface.

func MakeGithubRepo added in v2.2.8

func MakeGithubRepo(input string) (clients.Repo, error)

MakeGithubRepo takes input of form "owner/repo" or "github.com/owner/repo" and returns an implementation of clients.Repo interface.

func NewLogger added in v2.2.3

func NewLogger(logLevel zapcore.Level) (*zap.Logger, error)

NewLogger creates an instance of *zap.Logger.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is GitHub-specific implementation of RepoClient.

func (*Client) Close

func (client *Client) Close() error

Close implements RepoClient.Close.

func (*Client) GetDefaultBranch

func (client *Client) GetDefaultBranch() (*clients.BranchRef, error)

GetDefaultBranch implements RepoClient.GetDefaultBranch.

func (*Client) GetFileContent

func (client *Client) GetFileContent(filename string) ([]byte, error)

GetFileContent implements RepoClient.GetFileContent.

func (*Client) InitRepo

func (client *Client) InitRepo(inputRepo clients.Repo) error

InitRepo sets up the GitHub repo in local storage for improving performance and GitHub token usage efficiency.

func (*Client) IsArchived added in v2.1.3

func (client *Client) IsArchived() (bool, error)

IsArchived implements RepoClient.IsArchived.

func (*Client) ListBranches added in v2.2.3

func (client *Client) ListBranches() ([]*clients.BranchRef, error)

ListBranches implements RepoClient.ListBranches.

func (*Client) ListCheckRunsForRef added in v2.2.3

func (client *Client) ListCheckRunsForRef(ref string) ([]clients.CheckRun, error)

ListCheckRunsForRef implements RepoClient.ListCheckRunsForRef.

func (*Client) ListCommits added in v2.1.3

func (client *Client) ListCommits() ([]clients.Commit, error)

ListCommits implements RepoClient.ListCommits.

func (*Client) ListContributors added in v2.2.3

func (client *Client) ListContributors() ([]clients.Contributor, error)

ListContributors implements RepoClient.ListContributors.

func (*Client) ListFiles

func (client *Client) ListFiles(predicate func(string) (bool, error)) ([]string, error)

ListFiles implements RepoClient.ListFiles.

func (*Client) ListMergedPRs

func (client *Client) ListMergedPRs() ([]clients.PullRequest, error)

ListMergedPRs implements RepoClient.ListMergedPRs.

func (*Client) ListReleases added in v2.2.3

func (client *Client) ListReleases() ([]clients.Release, error)

ListReleases implements RepoClient.ListReleases.

func (*Client) ListStatuses added in v2.2.3

func (client *Client) ListStatuses(ref string) ([]clients.Status, error)

ListStatuses implements RepoClient.ListStatuses.

func (*Client) ListSuccessfulWorkflowRuns added in v2.2.3

func (client *Client) ListSuccessfulWorkflowRuns(filename string) ([]clients.WorkflowRun, error)

ListSuccessfulWorkflowRuns implements RepoClient.WorkflowRunsByFilename.

func (*Client) Search added in v2.2.3

func (client *Client) Search(request clients.SearchRequest) (clients.SearchResponse, error)

Search implements RepoClient.Search.

func (*Client) URL added in v2.2.3

func (client *Client) URL() string

URL implements RepoClient.URL.

Directories

Path Synopsis
Package roundtripper has implementations of http.RoundTripper useful to clients.RepoClient.
Package roundtripper has implementations of http.RoundTripper useful to clients.RepoClient.

Jump to

Keyboard shortcuts

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