Documentation
¶
Index ¶
- Constants
- func CloneRepository(ctx context.Context, gitInfo *GitInfo, targetDir string, helper string, ...) error
- func CloneRepositoryWithEnv(ctx context.Context, gitInfo *GitInfo, extraEnv []string, targetDir string, ...) error
- func CommandContext(ctx context.Context, extraEnv []string, args ...string) *exec.Cmd
- func GetBranchNameForPR(ref string) string
- func GetDefaultExtraEnv(strictHostKeyChecking bool) []string
- func GetIDForPR(ref string) string
- func InstallBinary(log log.Logger) error
- func NormalizeRepository(str string) (string, string, string, string, string)
- func PingRepository(str string, extraEnv []string) bool
- type CloneStrategy
- type Cloner
- type GitInfo
- type Option
Constants ¶
View Source
const ( CommitDelimiter string = "@sha256:" PullRequestReference string = "pull/([0-9]+)/head" SubPathDelimiter string = "@subpath:" )
Variables ¶
This section is empty.
Functions ¶
func CloneRepository ¶
func CloneRepositoryWithEnv ¶
func CommandContext ¶
func GetBranchNameForPR ¶
func GetDefaultExtraEnv ¶
func GetIDForPR ¶
func InstallBinary ¶
func NormalizeRepository ¶
func PingRepository ¶
Types ¶
type CloneStrategy ¶
type CloneStrategy string
const ( FullCloneStrategy CloneStrategy = "" BloblessCloneStrategy CloneStrategy = "blobless" TreelessCloneStrategy CloneStrategy = "treeless" ShallowCloneStrategy CloneStrategy = "shallow" BareCloneStrategy CloneStrategy = "bare" )
func (*CloneStrategy) Set ¶
func (s *CloneStrategy) Set(v string) error
func (*CloneStrategy) String ¶
func (s *CloneStrategy) String() string
func (*CloneStrategy) Type ¶
func (s *CloneStrategy) Type() string
type Cloner ¶
type Cloner interface {
Clone(ctx context.Context, repository string, targetDir string, extraArgs, extraEnv []string, log log.Logger) error
}
func NewCloner ¶
func NewCloner(strategy CloneStrategy) Cloner
func NewClonerWithOpts ¶
type Option ¶
type Option func(*cloner)
func WithCloneStrategy ¶
func WithCloneStrategy(strategy CloneStrategy) Option
func WithRecursiveSubmodules ¶
func WithRecursiveSubmodules() Option
func WithSkipLFS ¶
func WithSkipLFS() Option
Click to show internal directories.
Click to hide internal directories.