Versions in this module Expand all Collapse all v0 v0.17.15 May 11, 2026 v0.17.14 May 11, 2026 Changes in this version + func BasicSceneSetup(scene *Scene) error + func ExpectBranches(t *testing.T, repo *GitRepo, expected []string) + func ExpectBranchesString(t *testing.T, repo *GitRepo, expected string) + func ExpectCommits(t *testing.T, repo *GitRepo, branch string, expected []string) + func ExpectCommitsString(t *testing.T, repo *GitRepo, expected string) + func GetBinaryError() error + func GetSharedBinaryPath() string + func InitialCommitSceneSetup(scene *Scene) error + func Must[T any](val T, err error) T + func NewMockGitHubClient(t *testing.T, config *MockGitHubServerConfig) (*github.Client, string, string) + func NewMockGitHubClientInterface(client *github.Client, owner, repo string, config *MockGitHubServerConfig) githubpkg.Client + func NewMockGitHubServer(t *testing.T, config *MockGitHubServerConfig) *httptest.Server + func NewSamplePullRequest(data SamplePRData) *github.PullRequest + func NewTestPrInfo(number int) *engine.PrInfo + func NewTestPrInfoClosed(number int) *engine.PrInfo + func NewTestPrInfoDraft(number int) *engine.PrInfo + func NewTestPrInfoEmpty() *engine.PrInfo + func NewTestPrInfoFull(number int, title, body, state, base, url string, isDraft bool) *engine.PrInfo + func NewTestPrInfoMerged(number int, base string) *engine.PrInfo + func NewTestPrInfoWithState(number int, state string) *engine.PrInfo + func NewTestPrInfoWithTitle(number int, title string) *engine.PrInfo + func NormalizeOutput(output string) string + func SetSharedBinaryPath(path string) + func TestMain(m *testing.M, cleanup func()) + type GitRepo struct + Dir string + UserConfigPath string + func NewGitRepo(dir string) (*GitRepo, error) + func NewGitRepoFromExisting(t interface{ ... }, dir string) *GitRepo + func NewGitRepoFromTemplate(dir string, templatePath string) (*GitRepo, error) + func NewGitRepoFromURL(dir string, repoURL string) (*GitRepo, error) + func (r *GitRepo) CheckoutBranch(name string) error + func (r *GitRepo) CheckoutDetached(rev string) error + func (r *GitRepo) CreateAndCheckoutBranch(name string) error + func (r *GitRepo) CreateBareRemote(name string) (string, error) + func (r *GitRepo) CreateBranch(name string) error + func (r *GitRepo) CreateChange(textValue string, prefix string, unstaged bool) error + func (r *GitRepo) CreateChangeAndAmend(textValue string, prefix string) error + func (r *GitRepo) CreateChangeAndCommit(textValue string, prefix string) error + func (r *GitRepo) CreatePrecommitHook(contents string) error + func (r *GitRepo) CurrentBranchName() (string, error) + func (r *GitRepo) DeleteBranch(name string) error + func (r *GitRepo) ForcePushBranch(remote, branch string) error + func (r *GitRepo) GetBranchSHA(branch string) (string, error) + func (r *GitRepo) GetCommitCount(from, to string) (int, error) + func (r *GitRepo) GetCurrentSHA() (string, error) + func (r *GitRepo) GetLocalBranches() ([]string, error) + func (r *GitRepo) GetRef(refName string) (string, error) + func (r *GitRepo) GetRevision(rev string) (string, error) + func (r *GitRepo) HasUnstagedChanges() (bool, error) + func (r *GitRepo) HasUntrackedFiles() (bool, error) + func (r *GitRepo) IsAncestor(ancestor, descendant string) (bool, error) + func (r *GitRepo) ListCurrentBranchCommitMessages() ([]string, error) + func (r *GitRepo) MarkMergeConflictsAsResolved() error + func (r *GitRepo) MergeBranch(branch, mergeIn string) error + func (r *GitRepo) PushBranch(remote, branch string) error + func (r *GitRepo) RebaseInProgress() bool + func (r *GitRepo) ResolveMergeConflicts() error + func (r *GitRepo) RunCliCommand(command []string) error + func (r *GitRepo) RunCliCommandAndGetOutput(command []string) (string, error) + func (r *GitRepo) RunGitCommand(args ...string) error + func (r *GitRepo) RunGitCommandAndGetOutput(args ...string) (string, error) + func (r *GitRepo) TrackBranch(branch string, parentBranch string) error + type MockGitHubClient struct + func (c *MockGitHubClient) BatchGetPRChecksStatus(ctx context.Context, branchNames []string) (map[string]*githubpkg.CheckStatus, error) + func (c *MockGitHubClient) BatchGetPRTitles(_ context.Context, _, _ string, prNumbers []int) (map[int]string, error) + func (c *MockGitHubClient) ClosePullRequest(ctx context.Context, owner, repo string, prNumber int) error + func (c *MockGitHubClient) CreatePRComment(ctx context.Context, owner, repo string, prNumber int, body string) (int64, error) + func (c *MockGitHubClient) CreatePullRequest(ctx context.Context, owner, repo string, opts githubpkg.CreatePROptions) (*githubpkg.PullRequestInfo, error) + func (c *MockGitHubClient) DeletePRComment(ctx context.Context, owner, repo string, commentID int64) error + func (c *MockGitHubClient) GetAllowedMergeMethods(_ context.Context) (*githubpkg.MergeMethodSettings, error) + func (c *MockGitHubClient) GetCurrentUser(_ context.Context) (string, error) + func (c *MockGitHubClient) GetOwnerRepo() (string, string) + func (c *MockGitHubClient) GetPRChecksStatus(ctx context.Context, branchName string) (*githubpkg.CheckStatus, error) + func (c *MockGitHubClient) GetPullRequest(ctx context.Context, owner, repo string, prNumber int) (*githubpkg.PullRequestInfo, error) + func (c *MockGitHubClient) GetPullRequestByBranch(ctx context.Context, owner, repo, branchName string) (*githubpkg.PullRequestInfo, error) + func (c *MockGitHubClient) ListPRComments(ctx context.Context, owner, repo string, prNumber int) ([]githubpkg.PRComment, error) + func (c *MockGitHubClient) MergePullRequest(_ context.Context, _ string, _ githubpkg.MergePROptions) error + func (c *MockGitHubClient) UpdatePRComment(ctx context.Context, owner, repo string, commentID int64, body string) error + func (c *MockGitHubClient) UpdatePullRequest(ctx context.Context, owner, repo string, prNumber int, ...) ([]string, error) + type MockGitHubServerConfig struct + CreatedPRs []*github.PullRequest + ErrorResponses map[string]error + Owner string + PRs map[string]*github.PullRequest + Repo string + UpdatedPRs map[int]*github.PullRequest + func NewMockGitHubServerConfig() *MockGitHubServerConfig + type SamplePRData struct + Base string + Body string + Draft bool + HTMLURL string + Head string + Number int + Reviewers []string + State string + TeamReviewers []string + Title string + func ClosedPRData() SamplePRData + func DefaultPRData() SamplePRData + func DraftPRData() SamplePRData + func MergedPRData() SamplePRData + func PRWithReviewersData(reviewers []string, teamReviewers []string) SamplePRData + type Scene struct + Dir string + Repo *GitRepo + func NewRemoteSceneParallel(t *testing.T) *Scene + func NewScene(t *testing.T, setup SceneSetup) *Scene + func NewSceneParallel(t *testing.T, setup SceneSetup) *Scene + type SceneSetup func(*Scene) error