cmd

package
v1.11.9 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2026 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Overview

Package cmd encapsulates the logic for all cli commands

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloneAllRepos added in v1.5.1

func CloneAllRepos(git git.Gitter, cloneTargets []scm.Repo)

CloneAllRepos clones all repos

func Execute added in v1.5.1

func Execute()

func GetVersion added in v1.7.15

func GetVersion() string

func InitConfig added in v1.7.0

func InitConfig()

func PrintConfigs added in v1.5.1

func PrintConfigs()

PrintConfigs shows the user what is set before cloning

func PrintVersion added in v1.7.15

func PrintVersion()

Types

type CloneStats added in v1.11.4

type CloneStats struct {
	CloneCount           int
	PulledCount          int
	UpdateRemoteCount    int
	NewCommits           int
	UntouchedPrunes      int
	TotalDurationSeconds int
	CloneInfos           []string
	CloneErrors          []string
}

CloneStats tracks statistics during clone operations

type ReClone added in v1.8.1

type ReClone struct {
	Cmd            string `yaml:"cmd"`
	Description    string `yaml:"description"`
	PostExecScript string `yaml:"post_exec_script"` // optional
}

type RepositoryFilter added in v1.11.4

type RepositoryFilter struct{}

RepositoryFilter handles filtering of repositories based on various criteria

func NewRepositoryFilter added in v1.11.4

func NewRepositoryFilter() *RepositoryFilter

NewRepositoryFilter creates a new repository filter

func (*RepositoryFilter) ApplyAllFilters added in v1.11.4

func (rf *RepositoryFilter) ApplyAllFilters(cloneTargets []scm.Repo) []scm.Repo

ApplyAllFilters applies all configured filters to the repository list

func (*RepositoryFilter) FilterByExcludeMatchPrefix added in v1.11.4

func (rf *RepositoryFilter) FilterByExcludeMatchPrefix(repos []scm.Repo) []scm.Repo

FilterByExcludeMatchPrefix filters out repositories that start with the specified prefix(es)

func (*RepositoryFilter) FilterByExcludeRegexMatch added in v1.11.4

func (rf *RepositoryFilter) FilterByExcludeRegexMatch(repos []scm.Repo) []scm.Repo

FilterByExcludeRegexMatch filters out repositories that match the regex pattern

func (*RepositoryFilter) FilterByGhorgignore added in v1.11.4

func (rf *RepositoryFilter) FilterByGhorgignore(cloneTargets []scm.Repo) []scm.Repo

FilterByGhorgignore filters out repositories listed in the ghorgignore file

func (*RepositoryFilter) FilterByGhorgonly added in v1.11.5

func (rf *RepositoryFilter) FilterByGhorgonly(cloneTargets []scm.Repo) []scm.Repo

FilterByGhorgonly filters repositories to only include those matching patterns in ghorgonly file

func (*RepositoryFilter) FilterByMatchPrefix added in v1.11.4

func (rf *RepositoryFilter) FilterByMatchPrefix(repos []scm.Repo) []scm.Repo

FilterByMatchPrefix filters repositories that start with the specified prefix(es)

func (*RepositoryFilter) FilterByRegexMatch added in v1.11.4

func (rf *RepositoryFilter) FilterByRegexMatch(repos []scm.Repo) []scm.Repo

FilterByRegexMatch filters repositories that match the regex pattern

func (*RepositoryFilter) FilterByTargetReposPath added in v1.11.4

func (rf *RepositoryFilter) FilterByTargetReposPath(cloneTargets []scm.Repo) []scm.Repo

FilterByTargetReposPath filters repositories based on a file containing target repo names

type RepositoryProcessor added in v1.11.4

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

RepositoryProcessor handles the processing of individual repositories

func NewRepositoryProcessor added in v1.11.4

func NewRepositoryProcessor(git git.Gitter) *RepositoryProcessor

NewRepositoryProcessor creates a new repository processor

func (*RepositoryProcessor) GetStats added in v1.11.4

func (rp *RepositoryProcessor) GetStats() CloneStats

GetStats returns a copy of the current statistics

func (*RepositoryProcessor) GetUntouchedRepos added in v1.11.4

func (rp *RepositoryProcessor) GetUntouchedRepos() []string

GetUntouchedRepos returns the list of untouched repositories

func (*RepositoryProcessor) ProcessRepository added in v1.11.4

func (rp *RepositoryProcessor) ProcessRepository(repo *scm.Repo, repoNameWithCollisions map[string]bool, hasCollisions bool, repoSlug string, index int)

ProcessRepository handles the cloning or updating of a single repository

func (*RepositoryProcessor) SetTotalDuration added in v1.11.4

func (rp *RepositoryProcessor) SetTotalDuration(durationSeconds int)

SetTotalDuration sets the total duration in seconds for the clone operation

Jump to

Keyboard shortcuts

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