Documentation ¶
Index ¶
- type GithubMock
- type IssuesMock
- func (m *IssuesMock) CallListAndReturnPr(prNumber int)
- func (m *IssuesMock) CreateComment(ctx context.Context, owner string, repo string, number int, ...) (*github.IssueComment, *github.Response, error)
- func (m *IssuesMock) ListByRepo(ctx context.Context, owner string, repo string, ...) ([]*github.Issue, *github.Response, error)
- type Paths
- type PullRequestsMock
- func (m *PullRequestsMock) CallCreate(prNumber int)
- func (m *PullRequestsMock) CallGetAndReturnMergeabilityBeingEvaluated(prNumber int)
- func (m *PullRequestsMock) CallGetAndReturnMergeable(prNumber int, mergeable bool)
- func (m *PullRequestsMock) CallMerge(prNumber int, tip string)
- func (m *PullRequestsMock) Create(ctx context.Context, owner string, repo string, pull *github.NewPullRequest) (*github.PullRequest, *github.Response, error)
- func (m *PullRequestsMock) Get(ctx context.Context, owner string, repo string, number int) (*github.PullRequest, *github.Response, error)
- func (m *PullRequestsMock) List(ctx context.Context, owner string, repo string, ...) ([]*github.PullRequest, *github.Response, error)
- func (m *PullRequestsMock) Merge(ctx context.Context, owner string, repo string, number int, ...) (*github.PullRequestMergeResult, *github.Response, error)
- type TestRepo
- func (r *TestRepo) AlwaysFailingEditor()
- func (r *TestRepo) AssertHasPr(t *testing.T, n int) *core.LocalPr
- func (r *TestRepo) Commit(msg string) plumbing.Hash
- func (r *TestRepo) CreatePr(t *testing.T, ref string, prNumber int, args ...string) *core.LocalPr
- func (r *TestRepo) GetGithubMock(ctx context.Context) *GithubMock
- func (r *TestRepo) MergePr(t *testing.T, pr *core.LocalPr) error
- func (r *TestRepo) PrepareSource()
- func (r *TestRepo) RewriteLastCommit(msg string)
- func (r *TestRepo) Run(command string, args ...string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GithubMock ¶
type GithubMock struct { *PullRequestsMock *IssuesMock }
func (GithubMock) Issues ¶
func (g GithubMock) Issues() core.GhIssues
func (GithubMock) PullRequests ¶
func (g GithubMock) PullRequests() core.GhPullRequest
type IssuesMock ¶
func (*IssuesMock) CallListAndReturnPr ¶
func (m *IssuesMock) CallListAndReturnPr(prNumber int)
func (*IssuesMock) CreateComment ¶
func (m *IssuesMock) CreateComment(ctx context.Context, owner string, repo string, number int, comment *github.IssueComment) (*github.IssueComment, *github.Response, error)
func (*IssuesMock) ListByRepo ¶
type PullRequestsMock ¶
func (*PullRequestsMock) CallCreate ¶
func (m *PullRequestsMock) CallCreate(prNumber int)
func (*PullRequestsMock) CallGetAndReturnMergeabilityBeingEvaluated ¶
func (m *PullRequestsMock) CallGetAndReturnMergeabilityBeingEvaluated(prNumber int)
func (*PullRequestsMock) CallGetAndReturnMergeable ¶
func (m *PullRequestsMock) CallGetAndReturnMergeable(prNumber int, mergeable bool)
func (*PullRequestsMock) CallMerge ¶
func (m *PullRequestsMock) CallMerge(prNumber int, tip string)
func (*PullRequestsMock) Create ¶
func (m *PullRequestsMock) Create(ctx context.Context, owner string, repo string, pull *github.NewPullRequest) (*github.PullRequest, *github.Response, error)
func (*PullRequestsMock) List ¶
func (m *PullRequestsMock) List(ctx context.Context, owner string, repo string, opt *github.PullRequestListOptions) ([]*github.PullRequest, *github.Response, error)
type TestRepo ¶
type TestRepo struct { *core.Repo Source *git.Repository GithubRepo *git.Repository Paths Paths GithubMock *GithubMock App *cli.App Out *strings.Builder }
func NewTestRepo ¶
func (*TestRepo) AlwaysFailingEditor ¶
func (r *TestRepo) AlwaysFailingEditor()
func (*TestRepo) GetGithubMock ¶
func (r *TestRepo) GetGithubMock(ctx context.Context) *GithubMock
func (*TestRepo) PrepareSource ¶
func (r *TestRepo) PrepareSource()
func (*TestRepo) RewriteLastCommit ¶
Click to show internal directories.
Click to hide internal directories.