Remove needless GetPullRequest from interface
@@ -7,7 +7,6 @@ import (
)
type checkerGitHubClientInterface interface {
- GetPullRequest(ctx context.Context, owner, repo string, number int) (*github.PullRequest, error)
GetPullRequestDiff(ctx context.Context, owner, repo string, number int) ([]byte, error)
CreateCheckRun(ctx context.Context, owner, repo string, opt github.CreateCheckRunOptions) (*github.CheckRun, error)
}
@@ -16,11 +15,6 @@ type checkerGitHubClient struct {
*github.Client
}
-func (c *checkerGitHubClient) GetPullRequest(ctx context.Context, owner, repo string, number int) (*github.PullRequest, error) {
- pr, _, err := c.PullRequests.Get(ctx, owner, repo, number)
- return pr, err
-}
-
func (c *checkerGitHubClient) GetPullRequestDiff(ctx context.Context, owner, repo string, number int) ([]byte, error) {
opt := github.RawOptions{Type: github.Diff}
d, _, err := c.PullRequests.GetRaw(ctx, owner, repo, number, opt)
