Documentation
¶
Index ¶
- func CheckProtocal(v config.Repo) string
- func CloneOnNotExist(repo config.Repo) error
- func GetRepoName(repo config.Repo) string
- func IsDuplcatedRepo(repos []config.Repo) (bool, error)
- func LocalRepoAddr(repo config.Repo) string
- func Pull(dst string, opts ...PullOptions) error
- func RunScript(repo config.Repo) (string, error)
- func SearchRepo(ID string) (config.Repo, error)
- type CloneOptions
- type PullOptions
- type UncriticalError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckProtocal ¶
func CloneOnNotExist ¶
CloneOnNotExist clone repo not exist locally
func GetRepoName ¶
func IsDuplcatedRepo ¶
check if repo dupl in config
Types ¶
type CloneOptions ¶
type CloneOptions struct { //hook type Type string //specify protocol Protocol string // Indicates whether the repository should be cloned as a mirror. Mirror bool // sshkey used for clone. Sshkey string // Indicates whether the repository should be cloned in bare format. Bare bool // Indicates whether to suppress the log output. Quiet bool // The branch to checkout for the working tree when Bare=false. Branch string //Under http protocol Username string Password string //token (github) Token string // The number of revisions to clone. Depth uint64 // The timeout duration before giving up for each shell command execution. The // default timeout duration will be used when not supplied. Timeout time.Duration }
Gogs code under mit.
type PullOptions ¶
type PullOptions struct { //specify protocol Protocol string // Indicates whether to rebased during pulling. Rebase bool // Type string // sshkey used for clone. Sshkey string //Under http protocol Username string Password string //github only Token string // Indicates whether to pull from all remotes. All bool // The remote to pull updates from when All=false. Remote string // The branch to pull updates from when All=false and Remote is supplied. Branch string // The timeout duration before giving up for each shell command execution. The // default timeout duration will be used when not supplied. Timeout time.Duration }
type UncriticalError ¶
Errors that does not infect cicd.
func CheckRepoConfig ¶
func CheckRepoConfig(repoarray []config.Repo) (string, []UncriticalError, error)
this checks if any attr is empty.
Click to show internal directories.
Click to hide internal directories.