repos

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2026 License: MIT Imports: 17 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package repos implements git operations fanned out across multiple repository directories.

The simple fan-out methods each prepend their git sub-command and delegate to the fanout worker pool, bounded by an invocation override or their default limit. They carry no individual doc comments.

Index

Constants

View Source
const (
	DefaultCheckoutConcurrency = 50
	DefaultPullConcurrency     = 25
	DefaultFetchConcurrency    = 25
	DefaultPushConcurrency     = 25
	DefaultCloneConcurrency    = 10
	DefaultLocalConcurrency    = 50
)

Default limits for operations run through the worker pool when no override is set.

Variables

This section is empty.

Functions

This section is empty.

Types

type DiffConfig

type DiffConfig struct {
	IgnoreEmpty      bool
	IgnoreFilePrefix []string
	MatchExtension   []string
	Args             []string
}

DiffConfig controls filtering and output options for DiffRepos.

type Repos

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

Repos holds the scribe, GitHub client, and rate limiter shared by all operations.

func New

func New(scrb scribe.Scriber, ghClient *github.Client, rate *rate.Limiter) *Repos

New returns a Repos using the provided scribe, GitHub client, and rate limiter.

func (*Repos) Branches

func (r *Repos) Branches(ctx context.Context, dirs []string, args ...string) error

func (*Repos) CheckoutRepos

func (r *Repos) CheckoutRepos(ctx context.Context, dirs []string, args ...string) error

func (*Repos) CloneRepos

func (r *Repos) CloneRepos(ctx context.Context, baseDir string) ([]*ctxhelper.Repository, error)

CloneRepos clones every repository in the context's repo map that is not already present, returning those cloned successfully.

func (*Repos) CommitRepos

func (r *Repos) CommitRepos(ctx context.Context, dirs []string, args ...string) error

func (*Repos) DiffRepos

func (r *Repos) DiffRepos(ctx context.Context, dirs []string, cfg *DiffConfig) error

DiffRepos runs git diff across all dirs using cfg to filter output.

func (*Repos) FetchRepos

func (r *Repos) FetchRepos(ctx context.Context, dirs []string, args ...string) error

func (*Repos) GetBranchAndTagNames

func (r *Repos) GetBranchAndTagNames(ctx context.Context, dirs []string) ([]string, error)

func (*Repos) GetBranchNames

func (r *Repos) GetBranchNames(ctx context.Context, dirs []string) ([]string, error)

func (*Repos) GetRemoteNames

func (r *Repos) GetRemoteNames(ctx context.Context, dirs []string) ([]string, error)

func (*Repos) GetRepos

func (r *Repos) GetRepos(ctx context.Context, name string) ([]*github.Repository, error)

func (*Repos) GetTagNames

func (r *Repos) GetTagNames(ctx context.Context, dirs []string) ([]string, error)

func (*Repos) ListBranches

func (r *Repos) ListBranches(ctx context.Context, dirs []string, args ...string) error

func (*Repos) ListTags

func (r *Repos) ListTags(ctx context.Context, dirs []string, ignoreEmpty bool, args ...string) error

func (*Repos) LogRepos

func (r *Repos) LogRepos(ctx context.Context, dirs []string, ignoreEmpty bool, args ...string) error

func (*Repos) MergeRepos

func (r *Repos) MergeRepos(ctx context.Context, dirs []string, args ...string) error

func (*Repos) PullRepos

func (r *Repos) PullRepos(ctx context.Context, dirs []string, args ...string) error

func (*Repos) PushRepos

func (r *Repos) PushRepos(ctx context.Context, dirs []string, args ...string) error

func (*Repos) ResetRepos

func (r *Repos) ResetRepos(ctx context.Context, dirs []string, args ...string) error

func (*Repos) RunAlias added in v0.0.6

func (r *Repos) RunAlias(ctx context.Context, dirs []string, name string, args ...string) error

RunAlias runs one repository at a time because aliases may be order-sensitive and their arguments leave no room for a concurrency override.

func (*Repos) StageFiles

func (r *Repos) StageFiles(ctx context.Context, dirs []string, args ...string) error

func (*Repos) StashRepos

func (r *Repos) StashRepos(ctx context.Context, dirs []string, args ...string) error

func (*Repos) StatusRepos

func (r *Repos) StatusRepos(ctx context.Context, dirs []string, ignoreEmpty bool, args ...string) error

func (*Repos) TagRepos

func (r *Repos) TagRepos(ctx context.Context, dirs []string, args ...string) error

Jump to

Keyboard shortcuts

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