repository

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2021 License: MPL-2.0-no-copyleft-exception Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is a repository client.

func New

func New(addr string, cert *transport.Cert, trace bool) (*Client, error)

New creates a new *Client.

func (*Client) ClearStates

func (c *Client) ClearStates(ctx context.Context, repoName, sha string) error

ClearStates removes all status reports from a SHA in an attempt to restart the process.

func (*Client) Close

func (c *Client) Close() error

Close closes the client's tracing functionality

func (*Client) CommentError

func (c *Client) CommentError(ctx context.Context, repoName string, prID int64, errstr string) error

CommentError is for commenting on PRs when there is no better means of bubbling up an error.

func (*Client) ErrorStatus

func (c *Client) ErrorStatus(ctx context.Context, repoName, sha, runName, url string, eErr error) error

ErrorStatus updates the status for the sha for the given repo.

func (*Client) FinishedStatus

func (c *Client) FinishedStatus(ctx context.Context, repoName, sha, runName, url string, status bool, msg string) error

FinishedStatus updates the status for the sha for the given repo.

func (*Client) GetDiffFiles

func (c *Client) GetDiffFiles(ctx context.Context, repoName, base, head string) ([]string, error)

GetDiffFiles retrieves the files present in the diff between the base and the head.

func (*Client) GetFile

func (c *Client) GetFile(ctx context.Context, repoName, sha, filename string) ([]byte, error)

GetFile retrieves an entire file by way of the repoName, sha, and filename.

func (*Client) GetFileList

func (c *Client) GetFileList(ctx context.Context, repoName, sha string) ([]string, error)

GetFileList finds all the files in the tree for the given repository

func (*Client) GetRefs

func (c *Client) GetRefs(ctx context.Context, repoName, sha string) ([]string, error)

GetRefs retreives many refs that have the corresponding SHA.

func (*Client) GetRepository

func (c *Client) GetRepository(ctx context.Context, u *model.User, repoName string) (*repository.RepositoryData, error)

GetRepository retrieves the github response for a given repository.

func (*Client) GetSHA

func (c *Client) GetSHA(ctx context.Context, repoName, ref string) (string, error)

GetSHA retrieves the SHA for the provided ref and repository.

func (*Client) MyLogin

func (c *Client) MyLogin(ctx context.Context, token string) (string, error)

MyLogin returns the username calling out to the API with its key. Can either be seeded by OAuth or Personal Token.

func (*Client) MyRepositories

func (c *Client) MyRepositories(ctx context.Context, u *model.User) ([]*repository.RepositoryData, error)

MyRepositories returns all the writable repositories accessible to user owning the access key

func (*Client) PendingStatus

func (c *Client) PendingStatus(ctx context.Context, repoName, sha, runName, url string) error

PendingStatus updates the status for the sha for the given repo.

func (*Client) SetupHook

func (c *Client) SetupHook(ctx context.Context, repoName, url, secret string) error

SetupHook sets up the pr webhook in the backing repository service.

func (*Client) StartedStatus

func (c *Client) StartedStatus(ctx context.Context, repoName, sha, runName, url string) error

StartedStatus updates the status for the sha for the given repo.

func (*Client) TeardownHook

func (c *Client) TeardownHook(ctx context.Context, repoName, url string) error

TeardownHook destroys the pr webhook in the backing repository service.

Jump to

Keyboard shortcuts

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