gitutils

package
v0.0.0-...-c9da2d3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package gitutils is a generated GoMock package.

Package gitutils is a generated GoMock package.

Package gitutils is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthFromToken

func AuthFromToken(token string) transport.AuthMethod

Types

type CherryPicker

type CherryPicker interface {
	Run(ctx context.Context, repo *git.Repository, repoPath string, commit *object.Commit) error
}

type CherryPickerImpl

type CherryPickerImpl struct {
	// contains filtered or unexported fields
}

func NewCherryPicker

func NewCherryPicker(markup string, logger logr.Logger, beforeCommitCmds ...[]string) *CherryPickerImpl

func (*CherryPickerImpl) Run

func (c *CherryPickerImpl) Run(ctx context.Context, repo *git.Repository, repoPath string, commit *object.Commit) error

type Differ

type Differ interface {
	GetMissingCommits(ctx context.Context, repo *git.Repository, repoName *gh.RepoName, since *time.Time, dsMainBranch string, upstreamConfig config.Upstream) ([]*object.Commit, error)
}

type DifferImpl

type DifferImpl struct {
	// contains filtered or unexported fields
}

func NewDiffer

func NewDiffer(helper Helper, ig intents.Getter, logger logr.Logger) *DifferImpl

func (*DifferImpl) GetMissingCommits

func (d *DifferImpl) GetMissingCommits(
	ctx context.Context,
	repo *git.Repository,
	repoName *gh.RepoName,
	since *time.Time,
	dsMainBranch string,
	usCfg config.Upstream,
) ([]*object.Commit, error)

type Executor

type Executor interface {
	RunCommand(ctx context.Context, logger logr.Logger, bin, dir string, args ...string) error
}

type ExecutorImpl

type ExecutorImpl struct {
	// contains filtered or unexported fields
}

func (*ExecutorImpl) RunCommand

func (e *ExecutorImpl) RunCommand(ctx context.Context, logger logr.Logger, bin, dir string, args ...string) error

type Helper

type Helper interface {
	FetchRemoteContext(ctx context.Context, remoteName, branchName string) error
	GetBranchRef(ctx context.Context, branchName string) (*plumbing.Reference, error)
	GetRemoteRef(ctx context.Context, remoteName, branchName string) (*plumbing.Reference, error)
	PushContextWithAuth(ctx context.Context, token string) error
	RecreateRemote(ctx context.Context, remoteNAme, remoteURL string) (*git.Remote, error)
}

func NewHelper

func NewHelper(repo *git.Repository, logger logr.Logger) Helper

type HelperImpl

type HelperImpl struct {
	// contains filtered or unexported fields
}

func (*HelperImpl) FetchRemoteContext

func (h *HelperImpl) FetchRemoteContext(ctx context.Context, remoteName, branchName string) error

func (*HelperImpl) GetBranchRef

func (h *HelperImpl) GetBranchRef(ctx context.Context, branchName string) (*plumbing.Reference, error)

func (*HelperImpl) GetRemoteRef

func (h *HelperImpl) GetRemoteRef(ctx context.Context, remoteName, branchName string) (*plumbing.Reference, error)

func (*HelperImpl) PushContextWithAuth

func (h *HelperImpl) PushContextWithAuth(ctx context.Context, token string) error

func (*HelperImpl) RecreateRemote

func (h *HelperImpl) RecreateRemote(ctx context.Context, remoteName, remoteURL string) (*git.Remote, error)

type MockCherryPicker

type MockCherryPicker struct {
	// contains filtered or unexported fields
}

MockCherryPicker is a mock of CherryPicker interface.

func NewMockCherryPicker

func NewMockCherryPicker(ctrl *gomock.Controller) *MockCherryPicker

NewMockCherryPicker creates a new mock instance.

func (*MockCherryPicker) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockCherryPicker) Run

func (m *MockCherryPicker) Run(ctx context.Context, repo *git.Repository, repoPath string, commit *object.Commit) error

Run mocks base method.

type MockCherryPickerMockRecorder

type MockCherryPickerMockRecorder struct {
	// contains filtered or unexported fields
}

MockCherryPickerMockRecorder is the mock recorder for MockCherryPicker.

func (*MockCherryPickerMockRecorder) Run

func (mr *MockCherryPickerMockRecorder) Run(ctx, repo, repoPath, commit interface{}) *gomock.Call

Run indicates an expected call of Run.

type MockDiffer

type MockDiffer struct {
	// contains filtered or unexported fields
}

MockDiffer is a mock of Differ interface.

func NewMockDiffer

func NewMockDiffer(ctrl *gomock.Controller) *MockDiffer

NewMockDiffer creates a new mock instance.

func (*MockDiffer) EXPECT

func (m *MockDiffer) EXPECT() *MockDifferMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockDiffer) GetMissingCommits

func (m *MockDiffer) GetMissingCommits(ctx context.Context, repo *git.Repository, repoName *github.RepoName, since *time.Time, dsMainBranch string, upstreamConfig config.Upstream) ([]*object.Commit, error)

GetMissingCommits mocks base method.

type MockDifferMockRecorder

type MockDifferMockRecorder struct {
	// contains filtered or unexported fields
}

MockDifferMockRecorder is the mock recorder for MockDiffer.

func (*MockDifferMockRecorder) GetMissingCommits

func (mr *MockDifferMockRecorder) GetMissingCommits(ctx, repo, repoName, since, dsMainBranch, upstreamConfig interface{}) *gomock.Call

GetMissingCommits indicates an expected call of GetMissingCommits.

type MockExecutor

type MockExecutor struct {
	// contains filtered or unexported fields
}

MockExecutor is a mock of Executor interface.

func NewMockExecutor

func NewMockExecutor(ctrl *gomock.Controller) *MockExecutor

NewMockExecutor creates a new mock instance.

func (*MockExecutor) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockExecutor) RunCommand

func (m *MockExecutor) RunCommand(ctx context.Context, logger logr.Logger, bin, dir string, args ...string) error

RunCommand mocks base method.

type MockExecutorMockRecorder

type MockExecutorMockRecorder struct {
	// contains filtered or unexported fields
}

MockExecutorMockRecorder is the mock recorder for MockExecutor.

func (*MockExecutorMockRecorder) RunCommand

func (mr *MockExecutorMockRecorder) RunCommand(ctx, logger, bin, dir interface{}, args ...interface{}) *gomock.Call

RunCommand indicates an expected call of RunCommand.

type MockHelper

type MockHelper struct {
	// contains filtered or unexported fields
}

MockHelper is a mock of Helper interface.

func NewMockHelper

func NewMockHelper(ctrl *gomock.Controller) *MockHelper

NewMockHelper creates a new mock instance.

func (*MockHelper) EXPECT

func (m *MockHelper) EXPECT() *MockHelperMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockHelper) FetchRemoteContext

func (m *MockHelper) FetchRemoteContext(ctx context.Context, remoteName, branchName string) error

FetchRemoteContext mocks base method.

func (*MockHelper) GetBranchRef

func (m *MockHelper) GetBranchRef(ctx context.Context, branchName string) (*plumbing.Reference, error)

GetBranchRef mocks base method.

func (*MockHelper) GetRemoteRef

func (m *MockHelper) GetRemoteRef(ctx context.Context, remoteName, branchName string) (*plumbing.Reference, error)

GetRemoteRef mocks base method.

func (*MockHelper) PushContextWithAuth

func (m *MockHelper) PushContextWithAuth(ctx context.Context, token string) error

PushContextWithAuth mocks base method.

func (*MockHelper) RecreateRemote

func (m *MockHelper) RecreateRemote(ctx context.Context, remoteNAme, remoteURL string) (*git.Remote, error)

RecreateRemote mocks base method.

type MockHelperMockRecorder

type MockHelperMockRecorder struct {
	// contains filtered or unexported fields
}

MockHelperMockRecorder is the mock recorder for MockHelper.

func (*MockHelperMockRecorder) FetchRemoteContext

func (mr *MockHelperMockRecorder) FetchRemoteContext(ctx, remoteName, branchName interface{}) *gomock.Call

FetchRemoteContext indicates an expected call of FetchRemoteContext.

func (*MockHelperMockRecorder) GetBranchRef

func (mr *MockHelperMockRecorder) GetBranchRef(ctx, branchName interface{}) *gomock.Call

GetBranchRef indicates an expected call of GetBranchRef.

func (*MockHelperMockRecorder) GetRemoteRef

func (mr *MockHelperMockRecorder) GetRemoteRef(ctx, remoteName, branchName interface{}) *gomock.Call

GetRemoteRef indicates an expected call of GetRemoteRef.

func (*MockHelperMockRecorder) PushContextWithAuth

func (mr *MockHelperMockRecorder) PushContextWithAuth(ctx, token interface{}) *gomock.Call

PushContextWithAuth indicates an expected call of PushContextWithAuth.

func (*MockHelperMockRecorder) RecreateRemote

func (mr *MockHelperMockRecorder) RecreateRemote(ctx, remoteNAme, remoteURL interface{}) *gomock.Call

RecreateRemote indicates an expected call of RecreateRemote.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL