Documentation ¶
Overview ¶
Package githubrepo implements clients.RepoClient for GitHub.
Index ¶
- func CreateGithubRepoClient(ctx context.Context, logger *zap.Logger) clients.RepoClient
- func MakeGithubRepo(input string) (clients.Repo, error)
- func NewLogger(logLevel zapcore.Level) (*zap.Logger, error)
- type Client
- func (client *Client) Close() error
- func (client *Client) GetDefaultBranch() (*clients.BranchRef, error)
- func (client *Client) GetFileContent(filename string) ([]byte, error)
- func (client *Client) InitRepo(inputRepo clients.Repo) error
- func (client *Client) IsArchived() (bool, error)
- func (client *Client) ListBranches() ([]*clients.BranchRef, error)
- func (client *Client) ListCheckRunsForRef(ref string) ([]clients.CheckRun, error)
- func (client *Client) ListCommits() ([]clients.Commit, error)
- func (client *Client) ListContributors() ([]clients.Contributor, error)
- func (client *Client) ListFiles(predicate func(string) (bool, error)) ([]string, error)
- func (client *Client) ListMergedPRs() ([]clients.PullRequest, error)
- func (client *Client) ListReleases() ([]clients.Release, error)
- func (client *Client) ListStatuses(ref string) ([]clients.Status, error)
- func (client *Client) ListSuccessfulWorkflowRuns(filename string) ([]clients.WorkflowRun, error)
- func (client *Client) Search(request clients.SearchRequest) (clients.SearchResponse, error)
- func (client *Client) URL() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateGithubRepoClient ¶
CreateGithubRepoClient returns a Client which implements RepoClient interface.
func MakeGithubRepo ¶ added in v2.2.8
MakeGithubRepo takes input of form "owner/repo" or "github.com/owner/repo" and returns an implementation of clients.Repo interface.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is GitHub-specific implementation of RepoClient.
func (*Client) GetDefaultBranch ¶
GetDefaultBranch implements RepoClient.GetDefaultBranch.
func (*Client) GetFileContent ¶
GetFileContent implements RepoClient.GetFileContent.
func (*Client) InitRepo ¶
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
IsArchived implements RepoClient.IsArchived.
func (*Client) ListBranches ¶ added in v2.2.3
ListBranches implements RepoClient.ListBranches.
func (*Client) ListCheckRunsForRef ¶ added in v2.2.3
ListCheckRunsForRef implements RepoClient.ListCheckRunsForRef.
func (*Client) ListCommits ¶ added in v2.1.3
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) ListMergedPRs ¶
func (client *Client) ListMergedPRs() ([]clients.PullRequest, error)
ListMergedPRs implements RepoClient.ListMergedPRs.
func (*Client) ListReleases ¶ added in v2.2.3
ListReleases implements RepoClient.ListReleases.
func (*Client) ListStatuses ¶ added in v2.2.3
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.
Source Files ¶
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. |