Documentation ¶
Index ¶
- func Run() error
- func RunWithArgs(args *Args) error
- type Args
- type RepositoryExecutor
- type RepositoryExecutorOption
- func WithCleanup(b bool) RepositoryExecutorOption
- func WithClient(client *github.Client) RepositoryExecutorOption
- func WithConcurrency(n int) RepositoryExecutorOption
- func WithLogger(logger *zap.Logger) RepositoryExecutorOption
- func WithNameList(names []string) RepositoryExecutorOption
- func WithNameRegexp(exp string) RepositoryExecutorOption
- func WithOrg(org string) RepositoryExecutorOption
- func WithOutputFormat(format RepositoryExecutorOutputFormat) RepositoryExecutorOption
- func WithOverwrite(b bool) RepositoryExecutorOption
- func WithShellPath(path string) RepositoryExecutorOption
- func WithTmpDir(dir string) RepositoryExecutorOption
- func WithTopicList(topics []string) RepositoryExecutorOption
- func WithTopicRegexp(exp string) RepositoryExecutorOption
- func WithUser(user string) RepositoryExecutorOption
- func WithUserAuth(user, token string) RepositoryExecutorOption
- type RepositoryExecutorOutputFormat
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunWithArgs ¶
Types ¶
type Args ¶
type Args struct { Command string `arg:"positional" help:"command to run at root of each repo."` // authentication AuthUser *string `arg:"env:GH_AUTH_USER" help:"user for authenticating API requests."` AuthToken *string `arg:"env:GH_AUTH_TOKEN" help:"token for authenticating API requests."` // repo owner options Org *string `arg:"-o" help:"organization owning repositories to be iterated."` User *string `arg:"-u" help:"user owning repositories to be iterated."` // filtering parameters NameExp *string `arg:"-n" help:"regular expression for matching repository names."` NameList *string `arg:"-N" help:"path to file containing repository names (newline separated)."` TopicExp *string `arg:"-t" help:"regular expression for matching topics."` TopicList *string `arg:"-T" help:"path to file containing topics (newline separated)."` // execution parameters Shell string `arg:"-s" default:"/bin/sh" help:"path to shell used to run command."` TmpDir string `arg:"-d" default:"./tmp" help:"directory into which repositories will be cloned."` Cleanup bool `arg:"-c" help:"enable to delete TMPDIR after operations are complete."` Overwrite bool `arg:"-O" help:"enable to delete TMPDIR before operations start."` NThreads int `arg:"-p" default:"1" help:"number of repositories that will be handled in parallel. -1 for unlimited."` Json bool `arg:"-j" help:"enable to display output as JSON."` Debug bool `arg:"-D" help:"enable to debug logging."` }
type RepositoryExecutor ¶
type RepositoryExecutor struct {
// contains filtered or unexported fields
}
func NewRepositoryExecutor ¶
func NewRepositoryExecutor(opts ...RepositoryExecutorOption) (*RepositoryExecutor, error)
type RepositoryExecutorOption ¶
type RepositoryExecutorOption = func(*RepositoryExecutor) error
func WithCleanup ¶
func WithCleanup(b bool) RepositoryExecutorOption
func WithClient ¶
func WithClient(client *github.Client) RepositoryExecutorOption
func WithConcurrency ¶
func WithConcurrency(n int) RepositoryExecutorOption
func WithLogger ¶
func WithLogger(logger *zap.Logger) RepositoryExecutorOption
func WithNameList ¶
func WithNameList(names []string) RepositoryExecutorOption
func WithNameRegexp ¶
func WithNameRegexp(exp string) RepositoryExecutorOption
func WithOrg ¶
func WithOrg(org string) RepositoryExecutorOption
func WithOutputFormat ¶
func WithOutputFormat(format RepositoryExecutorOutputFormat) RepositoryExecutorOption
func WithOverwrite ¶
func WithOverwrite(b bool) RepositoryExecutorOption
func WithShellPath ¶
func WithShellPath(path string) RepositoryExecutorOption
func WithTmpDir ¶
func WithTmpDir(dir string) RepositoryExecutorOption
func WithTopicList ¶
func WithTopicList(topics []string) RepositoryExecutorOption
func WithTopicRegexp ¶
func WithTopicRegexp(exp string) RepositoryExecutorOption
func WithUser ¶
func WithUser(user string) RepositoryExecutorOption
func WithUserAuth ¶
func WithUserAuth(user, token string) RepositoryExecutorOption
type RepositoryExecutorOutputFormat ¶
type RepositoryExecutorOutputFormat = int
const ( ConsoleOutputFormat RepositoryExecutorOutputFormat = iota JsonOutputFormat )
Click to show internal directories.
Click to hide internal directories.