Documentation
¶
Index ¶
- Variables
- func IsRecoverableError(err error) bool
- type Client
- type Context
- type MockClient
- func (_m *MockClient) CreateReview(ctx context.Context, c *Context, review *github.PullRequestReviewRequest) error
- func (_m *MockClient) EXPECT() *MockClientMockRecorder
- func (_m *MockClient) GetPullRequest(ctx context.Context, c *Context) (*github.PullRequest, error)
- func (_m *MockClient) GetPullRequestComments(ctx context.Context, c *Context) ([]*github.PullRequestComment, error)
- func (_m *MockClient) GetPullRequestPatch(ctx context.Context, c *Context) (string, error)
- func (_m *MockClient) SetCommitStatus(ctx context.Context, c *Context, ref string, status Status, desc string, ...) error
- type MockClientMockRecorder
- func (_mr *MockClientMockRecorder) CreateReview(arg0, arg1, arg2 interface{}) *gomock.Call
- func (_mr *MockClientMockRecorder) GetPullRequest(arg0, arg1 interface{}) *gomock.Call
- func (_mr *MockClientMockRecorder) GetPullRequestComments(arg0, arg1 interface{}) *gomock.Call
- func (_mr *MockClientMockRecorder) GetPullRequestPatch(arg0, arg1 interface{}) *gomock.Call
- func (_mr *MockClientMockRecorder) SetCommitStatus(arg0, arg1, arg2, arg3, arg4, arg5 interface{}) *gomock.Call
- type MyClient
- func (gc *MyClient) CreateReview(ctx context.Context, c *Context, review *gh.PullRequestReviewRequest) error
- func (gc *MyClient) GetPullRequest(ctx context.Context, c *Context) (*gh.PullRequest, error)
- func (gc *MyClient) GetPullRequestComments(ctx context.Context, c *Context) ([]*gh.PullRequestComment, error)
- func (gc *MyClient) GetPullRequestPatch(ctx context.Context, c *Context) (string, error)
- func (gc *MyClient) SetCommitStatus(ctx context.Context, c *Context, ref string, status Status, desc, url string) error
- type Repo
- type Status
Constants ¶
This section is empty.
Variables ¶
var ErrPRNotFound = errors.New("no such pull request")
var FakeContext = Context{ Repo: Repo{ Owner: "owner", Name: "name", }, GithubAccessToken: "access_token", PullRequestNumber: 1, }
Functions ¶
func IsRecoverableError ¶
Types ¶
type Client ¶
type Client interface { GetPullRequest(ctx context.Context, c *Context) (*gh.PullRequest, error) GetPullRequestComments(ctx context.Context, c *Context) ([]*gh.PullRequestComment, error) GetPullRequestPatch(ctx context.Context, c *Context) (string, error) CreateReview(ctx context.Context, c *Context, review *gh.PullRequestReviewRequest) error SetCommitStatus(ctx context.Context, c *Context, ref string, status Status, desc, url string) error }
type Context ¶
func (Context) GetCloneURL ¶
func (c Context) GetCloneURL(repo *gh.Repository) string
type MockClient ¶
type MockClient struct {
// contains filtered or unexported fields
}
MockClient is a mock of Client interface
func NewMockClient ¶
func NewMockClient(ctrl *gomock.Controller) *MockClient
NewMockClient creates a new mock instance
func (*MockClient) CreateReview ¶
func (_m *MockClient) CreateReview(ctx context.Context, c *Context, review *github.PullRequestReviewRequest) error
CreateReview mocks base method
func (*MockClient) EXPECT ¶
func (_m *MockClient) EXPECT() *MockClientMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockClient) GetPullRequest ¶
func (_m *MockClient) GetPullRequest(ctx context.Context, c *Context) (*github.PullRequest, error)
GetPullRequest mocks base method
func (*MockClient) GetPullRequestComments ¶
func (_m *MockClient) GetPullRequestComments(ctx context.Context, c *Context) ([]*github.PullRequestComment, error)
GetPullRequestComments mocks base method
func (*MockClient) GetPullRequestPatch ¶
GetPullRequestPatch mocks base method
type MockClientMockRecorder ¶
type MockClientMockRecorder struct {
// contains filtered or unexported fields
}
MockClientMockRecorder is the mock recorder for MockClient
func (*MockClientMockRecorder) CreateReview ¶
func (_mr *MockClientMockRecorder) CreateReview(arg0, arg1, arg2 interface{}) *gomock.Call
CreateReview indicates an expected call of CreateReview
func (*MockClientMockRecorder) GetPullRequest ¶
func (_mr *MockClientMockRecorder) GetPullRequest(arg0, arg1 interface{}) *gomock.Call
GetPullRequest indicates an expected call of GetPullRequest
func (*MockClientMockRecorder) GetPullRequestComments ¶
func (_mr *MockClientMockRecorder) GetPullRequestComments(arg0, arg1 interface{}) *gomock.Call
GetPullRequestComments indicates an expected call of GetPullRequestComments
func (*MockClientMockRecorder) GetPullRequestPatch ¶
func (_mr *MockClientMockRecorder) GetPullRequestPatch(arg0, arg1 interface{}) *gomock.Call
GetPullRequestPatch indicates an expected call of GetPullRequestPatch
func (*MockClientMockRecorder) SetCommitStatus ¶
func (_mr *MockClientMockRecorder) SetCommitStatus(arg0, arg1, arg2, arg3, arg4, arg5 interface{}) *gomock.Call
SetCommitStatus indicates an expected call of SetCommitStatus
type MyClient ¶
type MyClient struct{}
func NewMyClient ¶
func NewMyClient() *MyClient