Documentation ¶
Overview ¶
Package githubrepo implements clients.RepoClient for GitHub.
Index ¶
- func CreateGithubRepoClient(ctx context.Context, logger *log.Logger) clients.RepoClient
- func CreateGithubRepoClientWithTransport(ctx context.Context, rt http.RoundTripper) clients.RepoClient
- func CreateOssFuzzRepoClient(ctx context.Context, logger *log.Logger) (clients.RepoClient, error)deprecated
- func MakeGithubRepo(input string) (clients.Repo, error)
- type Client
- func (client *Client) Close() error
- func (client *Client) GetBranch(branch string) (*clients.BranchRef, error)
- func (client *Client) GetCreatedAt() (time.Time, error)
- func (client *Client) GetDefaultBranch() (*clients.BranchRef, error)
- func (client *Client) GetDefaultBranchName() (string, error)
- func (client *Client) GetFileContent(filename string) ([]byte, error)
- func (client *Client) GetOrgRepoClient(ctx context.Context) (clients.RepoClient, error)
- func (client *Client) InitRepo(inputRepo clients.Repo, commitSHA string, commitDepth int) error
- func (client *Client) IsArchived() (bool, error)
- func (client *Client) ListCheckRunsForRef(ref string) ([]clients.CheckRun, error)
- func (client *Client) ListCommits() ([]clients.Commit, error)
- func (client *Client) ListContributors() ([]clients.User, error)
- func (client *Client) ListFiles(predicate func(string) (bool, error)) ([]string, error)
- func (client *Client) ListIssues() ([]clients.Issue, error)
- func (client *Client) ListLicenses() ([]clients.License, error)
- func (client *Client) ListProgrammingLanguages() ([]clients.Language, 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) ListWebhooks() ([]clients.Webhook, error)
- func (client *Client) LocalPath() (string, error)
- func (client *Client) Search(request clients.SearchRequest) (clients.SearchResponse, error)
- func (client *Client) SearchCommits(request clients.SearchCommitsOptions) ([]clients.Commit, error)
- func (client *Client) URI() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateGithubRepoClient ¶
CreateGithubRepoClient returns a Client which implements RepoClient interface.
func CreateGithubRepoClientWithTransport ¶
func CreateGithubRepoClientWithTransport(ctx context.Context, rt http.RoundTripper) clients.RepoClient
CreateGithubRepoClientWithTransport returns a Client which implements RepoClient interface.
func CreateOssFuzzRepoClient
deprecated
CreateOssFuzzRepoClient returns a RepoClient implementation intialized to `google/oss-fuzz` GitHub repository.
Deprecated: Searching the github.com/google/oss-fuzz repo for projects is flawed. Use a constructor from clients/ossfuzz instead. https://github.com/sscsb/scoremet/issues/2670
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is GitHub-specific implementation of RepoClient.
func (*Client) GetCreatedAt ¶
GetCreatedAt is a getter for repo.CreatedAt.
func (*Client) GetDefaultBranch ¶
GetDefaultBranch implements RepoClient.GetDefaultBranch.
func (*Client) GetDefaultBranchName ¶
GetDefaultBranchName implements RepoClient.GetDefaultBranchName.
func (*Client) GetFileContent ¶
GetFileContent implements RepoClient.GetFileContent.
func (*Client) GetOrgRepoClient ¶
func (*Client) InitRepo ¶
InitRepo sets up the GitHub repo in local storage for improving performance and GitHub token usage efficiency.
func (*Client) IsArchived ¶
IsArchived implements RepoClient.IsArchived.
func (*Client) ListCheckRunsForRef ¶
ListCheckRunsForRef implements RepoClient.ListCheckRunsForRef.
func (*Client) ListCommits ¶
ListCommits implements RepoClient.ListCommits.
func (*Client) ListContributors ¶
ListContributors implements RepoClient.ListContributors.
func (*Client) ListIssues ¶
ListIssues implements RepoClient.ListIssues.
func (*Client) ListLicenses ¶
ListLicenses implements RepoClient.ListLicenses.
func (*Client) ListProgrammingLanguages ¶
ListProgrammingLanguages implements RepoClient.ListProgrammingLanguages.
func (*Client) ListReleases ¶
ListReleases implements RepoClient.ListReleases.
func (*Client) ListStatuses ¶
ListStatuses implements RepoClient.ListStatuses.
func (*Client) ListSuccessfulWorkflowRuns ¶
func (client *Client) ListSuccessfulWorkflowRuns(filename string) ([]clients.WorkflowRun, error)
ListSuccessfulWorkflowRuns implements RepoClient.WorkflowRunsByFilename.
func (*Client) ListWebhooks ¶
ListWebhooks implements RepoClient.ListWebhooks.
func (*Client) Search ¶
func (client *Client) Search(request clients.SearchRequest) (clients.SearchResponse, error)
Search implements RepoClient.Search.
func (*Client) SearchCommits ¶
SearchCommits implements RepoClient.SearchCommits.
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. |
tokens
Package tokens defines interface to access GitHub PATs.
|
Package tokens defines interface to access GitHub PATs. |
tokens/server
Package main implements the GitHub token server.
|
Package main implements the GitHub token server. |