git

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: MPL-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetCredentials

func SetCredentials(cfg config.ServerConfig, vcsClient vcs.Client) error

SetCredentials ensures Git auth is set up for cloning

Types

type Repo

type Repo struct {
	// informational
	BranchName string
	Config     config.ServerConfig
	CloneURL   string

	// exposed state
	Directory string
}

func New

func New(cfg config.ServerConfig, cloneUrl, branchName string) *Repo

func (*Repo) Clone

func (r *Repo) Clone(ctx context.Context) error

func (*Repo) GetListOfChangedFiles

func (r *Repo) GetListOfChangedFiles(ctx context.Context) ([]string, error)

GetListOfChangedFiles returns a list of files that have changed between the current branch and the target branch

func (*Repo) GetRemoteHead added in v1.5.1

func (r *Repo) GetRemoteHead() (string, error)

func (*Repo) MergeIntoTarget

func (r *Repo) MergeIntoTarget(ctx context.Context, sha string) error

func (*Repo) Update

func (r *Repo) Update(ctx context.Context) error

func (*Repo) Wipe added in v1.5.1

func (r *Repo) Wipe()

type RepoManager

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

func NewRepoManager

func NewRepoManager(cfg config.ServerConfig) *RepoManager

func (*RepoManager) Cleanup

func (rm *RepoManager) Cleanup()

func (*RepoManager) Clone

func (rm *RepoManager) Clone(ctx context.Context, cloneUrl, branchName string) (*Repo, error)

Jump to

Keyboard shortcuts

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