github

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RepositoryClient

type RepositoryClient struct {
	*github.Client
	Owner             string
	Repo              string
	WaitForQuotaReset bool
}

func NewRepositoryClient

func NewRepositoryClient(ctx context.Context, accessToken, owner, repo string, waitForQuotaReset bool) *RepositoryClient

func (*RepositoryClient) DownloadArtifacts

func (r *RepositoryClient) DownloadArtifacts(ctx context.Context, artifactList []*github.Artifact, dir,
	namePattern string, after, before *time.Time) ([]string, error)

DownloadArtifacts tries to download artifacts from a artifact list to a directory based on name and time filtering. The client is required to have authentication. The function returns a list of successfully downloaded artifacts and error. Github API related errors are aggrgated and do not stop its following operations due to possible throttling.

func (*RepositoryClient) ListAllArtifacts

func (r *RepositoryClient) ListAllArtifacts(ctx context.Context) ([]*github.Artifact, error)

func (*RepositoryClient) ListCommitsFromPR

func (r *RepositoryClient) ListCommitsFromPR(ctx context.Context, pullNum int) ([]string, error)

func (*RepositoryClient) ListPRComments

func (r *RepositoryClient) ListPRComments(ctx context.Context, pullNum int) ([]*github.IssueComment, error)

func (*RepositoryClient) PostPRComment

func (r *RepositoryClient) PostPRComment(ctx context.Context, pullNum int, data *string) error

Jump to

Keyboard shortcuts

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