Documentation ¶
Overview ¶
Package github is a generated GoMock package.
Package github is a generated GoMock package.
Package github is a generated GoMock package.
Index ¶
- func NewGitHubClient(ctx context.Context, token string) *github.Client
- func PRHasLabel(pr *github.PullRequest, label string) bool
- type BaseData
- type Commit
- type IssueData
- type IssueHelper
- type IssueHelperImpl
- func (ih *IssueHelperImpl) Assign(ctx context.Context, issue *github.Issue, usersLogin ...string) error
- func (ih *IssueHelperImpl) Create(ctx context.Context, err error, upstreamURL string, commit *object.Commit) (*github.Issue, error)
- func (ih *IssueHelperImpl) ListAllOpen(ctx context.Context, includePRs bool) ([]*github.Issue, error)
- type MockIssueHelper
- func (m *MockIssueHelper) Assign(ctx context.Context, issue *github.Issue, usersLogin ...string) error
- func (m *MockIssueHelper) Create(ctx context.Context, err error, upstreamURL string, commit *object.Commit) (*github.Issue, error)
- func (m *MockIssueHelper) EXPECT() *MockIssueHelperMockRecorder
- func (m *MockIssueHelper) ListAllOpen(ctx context.Context, includePRs bool) ([]*github.Issue, error)
- type MockIssueHelperMockRecorder
- func (mr *MockIssueHelperMockRecorder) Assign(ctx, issue interface{}, usersLogin ...interface{}) *gomock.Call
- func (mr *MockIssueHelperMockRecorder) Create(ctx, err, upstreamURL, commit interface{}) *gomock.Call
- func (mr *MockIssueHelperMockRecorder) ListAllOpen(ctx, includePRs interface{}) *gomock.Call
- type MockPRHelper
- func (m *MockPRHelper) Create(ctx context.Context, branch, base, upstreamURL string, commit *object.Commit, ...) (*github.PullRequest, error)
- func (m *MockPRHelper) EXPECT() *MockPRHelperMockRecorder
- func (m *MockPRHelper) ListAllOpen(ctx context.Context, filter PRFilterFunc) ([]*github.PullRequest, error)
- func (m *MockPRHelper) MakeReady(ctx context.Context, pr *github.PullRequest) error
- type MockPRHelperMockRecorder
- type MockUserHelper
- type MockUserHelperMockRecorder
- type PRData
- type PRFilterFunc
- type PRHelper
- type PRHelperImpl
- func (ph *PRHelperImpl) Create(ctx context.Context, branch, base, upstreamURL string, commit *object.Commit, ...) (*github.PullRequest, error)
- func (ph *PRHelperImpl) ListAllOpen(ctx context.Context, filter PRFilterFunc) ([]*github.PullRequest, error)
- func (ph *PRHelperImpl) MakeReady(ctx context.Context, pr *github.PullRequest) error
- type RepoName
- type UserHelper
- type UserHelperImpl
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PRHasLabel ¶
func PRHasLabel(pr *github.PullRequest, label string) bool
Types ¶
type IssueData ¶
func (*IssueData) ProcessError ¶
type IssueHelper ¶
type IssueHelperImpl ¶
type IssueHelperImpl struct {
// contains filtered or unexported fields
}
func NewIssueHelper ¶
func NewIssueHelper(gc *github.Client, markup string, name *RepoName) *IssueHelperImpl
func (*IssueHelperImpl) ListAllOpen ¶
type MockIssueHelper ¶
type MockIssueHelper struct {
// contains filtered or unexported fields
}
MockIssueHelper is a mock of IssueHelper interface.
func NewMockIssueHelper ¶
func NewMockIssueHelper(ctrl *gomock.Controller) *MockIssueHelper
NewMockIssueHelper creates a new mock instance.
func (*MockIssueHelper) Assign ¶
func (m *MockIssueHelper) Assign(ctx context.Context, issue *github.Issue, usersLogin ...string) error
Assign mocks base method.
func (*MockIssueHelper) Create ¶
func (m *MockIssueHelper) Create(ctx context.Context, err error, upstreamURL string, commit *object.Commit) (*github.Issue, error)
Create mocks base method.
func (*MockIssueHelper) EXPECT ¶
func (m *MockIssueHelper) EXPECT() *MockIssueHelperMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockIssueHelper) ListAllOpen ¶
func (m *MockIssueHelper) ListAllOpen(ctx context.Context, includePRs bool) ([]*github.Issue, error)
ListAllOpen mocks base method.
type MockIssueHelperMockRecorder ¶
type MockIssueHelperMockRecorder struct {
// contains filtered or unexported fields
}
MockIssueHelperMockRecorder is the mock recorder for MockIssueHelper.
func (*MockIssueHelperMockRecorder) Assign ¶
func (mr *MockIssueHelperMockRecorder) Assign(ctx, issue interface{}, usersLogin ...interface{}) *gomock.Call
Assign indicates an expected call of Assign.
func (*MockIssueHelperMockRecorder) Create ¶
func (mr *MockIssueHelperMockRecorder) Create(ctx, err, upstreamURL, commit interface{}) *gomock.Call
Create indicates an expected call of Create.
func (*MockIssueHelperMockRecorder) ListAllOpen ¶
func (mr *MockIssueHelperMockRecorder) ListAllOpen(ctx, includePRs interface{}) *gomock.Call
ListAllOpen indicates an expected call of ListAllOpen.
type MockPRHelper ¶
type MockPRHelper struct {
// contains filtered or unexported fields
}
MockPRHelper is a mock of PRHelper interface.
func NewMockPRHelper ¶
func NewMockPRHelper(ctrl *gomock.Controller) *MockPRHelper
NewMockPRHelper creates a new mock instance.
func (*MockPRHelper) Create ¶
func (m *MockPRHelper) Create(ctx context.Context, branch, base, upstreamURL string, commit *object.Commit, draft bool) (*github.PullRequest, error)
Create mocks base method.
func (*MockPRHelper) EXPECT ¶
func (m *MockPRHelper) EXPECT() *MockPRHelperMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockPRHelper) ListAllOpen ¶
func (m *MockPRHelper) ListAllOpen(ctx context.Context, filter PRFilterFunc) ([]*github.PullRequest, error)
ListAllOpen mocks base method.
func (*MockPRHelper) MakeReady ¶
func (m *MockPRHelper) MakeReady(ctx context.Context, pr *github.PullRequest) error
MakeReady mocks base method.
type MockPRHelperMockRecorder ¶
type MockPRHelperMockRecorder struct {
// contains filtered or unexported fields
}
MockPRHelperMockRecorder is the mock recorder for MockPRHelper.
func (*MockPRHelperMockRecorder) Create ¶
func (mr *MockPRHelperMockRecorder) Create(ctx, branch, base, upstreamURL, commit, draft interface{}) *gomock.Call
Create indicates an expected call of Create.
func (*MockPRHelperMockRecorder) ListAllOpen ¶
func (mr *MockPRHelperMockRecorder) ListAllOpen(ctx, filter interface{}) *gomock.Call
ListAllOpen indicates an expected call of ListAllOpen.
func (*MockPRHelperMockRecorder) MakeReady ¶
func (mr *MockPRHelperMockRecorder) MakeReady(ctx, pr interface{}) *gomock.Call
MakeReady indicates an expected call of MakeReady.
type MockUserHelper ¶
type MockUserHelper struct {
// contains filtered or unexported fields
}
MockUserHelper is a mock of UserHelper interface.
func NewMockUserHelper ¶
func NewMockUserHelper(ctrl *gomock.Controller) *MockUserHelper
NewMockUserHelper creates a new mock instance.
func (*MockUserHelper) EXPECT ¶
func (m *MockUserHelper) EXPECT() *MockUserHelperMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockUserHelper) GetCommitAuthor ¶
GetCommitAuthor mocks base method.
type MockUserHelperMockRecorder ¶
type MockUserHelperMockRecorder struct {
// contains filtered or unexported fields
}
MockUserHelperMockRecorder is the mock recorder for MockUserHelper.
func (*MockUserHelperMockRecorder) GetCommitAuthor ¶
func (mr *MockUserHelperMockRecorder) GetCommitAuthor(ctx, sha interface{}) *gomock.Call
GetCommitAuthor indicates an expected call of GetCommitAuthor.
type PRFilterFunc ¶
type PRFilterFunc = func(*github.PullRequest) bool
type PRHelper ¶
type PRHelper interface { Create(ctx context.Context, branch, base, upstreamURL string, commit *object.Commit, draft bool) (*github.PullRequest, error) ListAllOpen(ctx context.Context, filter PRFilterFunc) ([]*github.PullRequest, error) MakeReady(ctx context.Context, pr *github.PullRequest) error }
type PRHelperImpl ¶
type PRHelperImpl struct {
// contains filtered or unexported fields
}
func NewPRHelper ¶
func (*PRHelperImpl) Create ¶
func (ph *PRHelperImpl) Create(ctx context.Context, branch, base, upstreamURL string, commit *object.Commit, draft bool) (*github.PullRequest, error)
func (*PRHelperImpl) ListAllOpen ¶
func (ph *PRHelperImpl) ListAllOpen(ctx context.Context, filter PRFilterFunc) ([]*github.PullRequest, error)
func (*PRHelperImpl) MakeReady ¶
func (ph *PRHelperImpl) MakeReady(ctx context.Context, pr *github.PullRequest) error
type RepoName ¶
func ParseRepoName ¶
type UserHelper ¶
type UserHelper interface {
GetCommitAuthor(ctx context.Context, sha string) (*github.User, error)
}
func NewUserHelper ¶
func NewUserHelper(gc *github.Client, repoName *RepoName) UserHelper
type UserHelperImpl ¶
type UserHelperImpl struct {
// contains filtered or unexported fields
}