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, args ...string) *exec.Cmd
- func GetBranchNameForPR(ref string) 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) 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 ¶ added in v0.5.0
func CloneRepositoryWithEnv ¶ added in v0.5.9
func GetBranchNameForPR ¶ added in v0.4.0
func GetIDForPR ¶ added in v0.5.22
func InstallBinary ¶ added in v0.5.20
func NormalizeRepository ¶ added in v0.2.0
func PingRepository ¶ added in v0.2.0
Types ¶
type CloneStrategy ¶ added in v0.5.7
type CloneStrategy string
const ( FullCloneStrategy CloneStrategy = "" BloblessCloneStrategy CloneStrategy = "blobless" TreelessCloneStrategy CloneStrategy = "treeless" ShallowCloneStrategy CloneStrategy = "shallow" BareCloneStrategy CloneStrategy = "bare" )
func (*CloneStrategy) Set ¶ added in v0.5.7
func (s *CloneStrategy) Set(v string) error
func (*CloneStrategy) String ¶ added in v0.5.7
func (s *CloneStrategy) String() string
func (*CloneStrategy) Type ¶ added in v0.5.7
func (s *CloneStrategy) Type() string
type Cloner ¶ added in v0.5.7
type Cloner interface {
Clone(ctx context.Context, repository string, targetDir string, extraArgs, extraEnv []string, log log.Logger) error
}
func NewCloner ¶ added in v0.5.7
func NewCloner(strategy CloneStrategy) Cloner
func NewClonerWithOpts ¶ added in v0.6.6
type GitInfo ¶ added in v0.5.0
func NewGitInfo ¶ added in v0.5.0
func NormalizeRepositoryGitInfo ¶ added in v0.5.0
type Option ¶ added in v0.6.6
type Option func(*cloner)
func WithCloneStrategy ¶ added in v0.6.6
func WithCloneStrategy(strategy CloneStrategy) Option
func WithRecursiveSubmodules ¶ added in v0.6.6
func WithRecursiveSubmodules() Option
Click to show internal directories.
Click to hide internal directories.