Skip to content

Commit

Permalink
Remove needless GetPullRequest from interface
Browse files Browse the repository at this point in the history
  • Loading branch information
haya14busa committed Sep 28, 2019
1 parent d70c5a9 commit 58502b9
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions doghouse/server/github_checker.go
Expand Up @@ -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)
}
Expand All @@ -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)
Expand Down

0 comments on commit 58502b9

Please sign in to comment.