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) GetFileReader(filename string) (io.ReadCloser, 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
- type Repo
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 initialized 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/ossf/scorecard/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) GetFileReader ¶
func (client *Client) GetFileReader(filename string) (io.ReadCloser, error)
GetFileReader implements RepoClient.GetFileReader.
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.
type Repo ¶
type Repo struct {
// contains filtered or unexported fields
}
func (*Repo) AppendMetadata ¶
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
internal
|
|
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. |