github.com/friedemannf/reviewdog@v0.14.0/doghouse/client/github_client.go (about)

     1  package client
     2  
     3  import (
     4  	"context"
     5  
     6  	"github.com/google/go-github/v37/github"
     7  
     8  	"github.com/friedemannf/reviewdog/doghouse"
     9  	"github.com/friedemannf/reviewdog/doghouse/server"
    10  )
    11  
    12  // GitHubClient is client which talks to GitHub directly instead of talking to
    13  // doghouse server.
    14  type GitHubClient struct {
    15  	Client *github.Client
    16  }
    17  
    18  func (c *GitHubClient) Check(ctx context.Context, req *doghouse.CheckRequest) (*doghouse.CheckResponse, error) {
    19  	return server.NewChecker(req, c.Client).Check(ctx)
    20  }