Documentation
¶
Index ¶
- func MockGitProvider(t *testing.T, repoID string, expectedDeployKeyTitle string, ...) (*httptest.Server, *http.Client)
- type FakeRepository
- func (f *FakeRepository) Commit(file string, message string) (string, error)
- func (f *FakeRepository) CreatePullRequest(title string, desc string, src string, dst string) error
- func (f *FakeRepository) CurrentBranch() (string, error)
- func (f *FakeRepository) DeleteLocalBranch(branch string) error
- func (f *FakeRepository) Path() string
- func (f *FakeRepository) Pull() (string, error)
- func (f *FakeRepository) Push(src string, dst string) error
- func (f *FakeRepository) RepoID() string
- func (f *FakeRepository) SwitchBranch(branch string, create bool) error
- type LocalGitRepository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MockGitProvider ¶
Types ¶
type FakeRepository ¶
type FakeRepository struct { RepoPath string PullError error CommitsMade []string // contains filtered or unexported fields }
func (*FakeRepository) Commit ¶
func (f *FakeRepository) Commit(file string, message string) (string, error)
func (*FakeRepository) CreatePullRequest ¶
func (*FakeRepository) CurrentBranch ¶
func (f *FakeRepository) CurrentBranch() (string, error)
func (*FakeRepository) DeleteLocalBranch ¶
func (f *FakeRepository) DeleteLocalBranch(branch string) error
func (*FakeRepository) Path ¶
func (f *FakeRepository) Path() string
func (*FakeRepository) Pull ¶
func (f *FakeRepository) Pull() (string, error)
func (*FakeRepository) RepoID ¶
func (f *FakeRepository) RepoID() string
func (*FakeRepository) SwitchBranch ¶
func (f *FakeRepository) SwitchBranch(branch string, create bool) error
type LocalGitRepository ¶
type LocalGitRepository struct { Repository *git.Repository Worktree *git.Worktree Directory string }
func InitGitRepository ¶
func SetupGitRepository ¶
func SetupGitRepository(t testing.TB, branch string) (*LocalGitRepository, error)
func (*LocalGitRepository) CommitFile ¶
func (r *LocalGitRepository) CommitFile(file string, message string) (string, error)
func (*LocalGitRepository) CommitNewFile ¶
func (r *LocalGitRepository) CommitNewFile(file string, message string) (string, error)
Click to show internal directories.
Click to hide internal directories.