Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertCommit ¶
Convert REST API Commit to unified Commit
func ConvertCommitParent ¶
func ConvertCommitParent(p *ghrest.Commit) *github.CommitParent
func ConvertRepositoryCommit ¶
func ConvertRepositoryCommit(c *ghrest.RepositoryCommit) *github.Commit
Convert REST API Commit to unified Commit
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
API provides access to GitHub's REST API, implementing various capabilities such as comparing commits.
func NewGitHubRESTAPI ¶
NewGitHubRESTAPI creates a new REST API.
type Client ¶
type Client interface {
CompareCommits(ctx context.Context, owner, repo string, base, head string, opts *ghrest.ListOptions) (*ghrest.CommitsComparison, *ghrest.Response, error)
}
Client defines the capabilities supported by this package.
type GitHubRESTClient ¶
type GitHubRESTClient struct {
// contains filtered or unexported fields
}
GitHubRESTClient implements the Client interface and forwards calls to the underlying go-github client while converting model types.
func NewGitHubRESTClient ¶
func NewGitHubRESTClient(httpClient *http.Client) *GitHubRESTClient
func (*GitHubRESTClient) CompareCommits ¶
func (c *GitHubRESTClient) CompareCommits(ctx context.Context, owner, repo, base, head string, opts *ghrest.ListOptions) (*ghrest.CommitsComparison, *ghrest.Response, error)
CompareCommits forwards the call to the go-github client.
Click to show internal directories.
Click to hide internal directories.