Documentation
¶
Index ¶
- Variables
- func ApplyPlan(f *Filters, plan *Plan, cmd *cobra.Command)
- func ConfigPath() string
- func NewLogger(c *Conf) *slog.Logger
- func RegisterFleet(conf *Conf, owner, dir string) error
- func SaveConf(conf *Conf) error
- func Setup(root *cobra.Command)
- func SetupCommands(root *cobra.Command)
- type Conf
- type Filters
- type GitHubConf
- type LogConf
- type Plan
Constants ¶
This section is empty.
Variables ¶
var ( Version = "unknown" Build = "unknown" BuildDate = "unknown" )
Build number and versions injected at compile time
Functions ¶
func ConfigPath ¶
func ConfigPath() string
func RegisterFleet ¶
RegisterFleet records an owner → directory mapping in conf.Fleets and persists config to disk. Idempotent: re-registering an existing mapping is a no-op.
func SaveConf ¶
SaveConf persists conf to disk with 0600 perms, preserving all fields. The token is taken from the existing on-disk config (when present) rather than from conf.GitHub.Token, so a token sourced only from the GITHUB_TOKEN environment variable is never written to disk by a background save such as sync registering a fleet.
func SetupCommands ¶
Types ¶
type Conf ¶
type Conf struct {
Path string `mapstructure:"path"`
Shallow bool `mapstructure:"shallow"`
Concurrent int `mapstructure:"concurrent"`
Interactive string `mapstructure:"interactive"`
Fleets map[string]string `mapstructure:"fleets"`
Log LogConf `mapstructure:"log"`
GitHub GitHubConf `mapstructure:"github"`
Console *console.Console
}
type Filters ¶
type Filters struct {
IncludeRegex string `yaml:"include_regex,omitempty"`
ExcludeRegex string `yaml:"exclude_regex,omitempty"`
Include []string `yaml:"include,omitempty"`
Exclude []string `yaml:"exclude,omitempty"`
Topics []string `yaml:"topics,omitempty"`
IncludeArchived bool `yaml:"include_archived,omitempty"`
IncludeForks bool `yaml:"include_forks,omitempty"`
Visibility string `yaml:"visibility,omitempty"`
Language string `yaml:"language,omitempty"`
Labels []string `yaml:"labels,omitempty"`
Group string `yaml:"group,omitempty"`
HasFiles []string `yaml:"has_files,omitempty"`
IfCmd string `yaml:"if_cmd,omitempty"`
Dirty bool `yaml:"dirty,omitempty"`
Ahead int `yaml:"ahead,omitempty"`
Behind int `yaml:"behind,omitempty"`
Wip bool `yaml:"wip,omitempty"`
}
Filters is the unified filter set applied by every command that operates on repositories. Flags are bound by addFilterFlags; Apply runs them against a list of repos, optionally consulting the manifest for label/group filtering.
func (Filters) Apply ¶
func (f Filters) Apply(repos []*provider.Repo, mf *manifest.FleetManifest) ([]*provider.Repo, error)
Apply filters a slice of repos. mf may be nil; manifest-based filters are skipped when it is. A name-filter regex compile error is returned as-is.
func (Filters) ApplyTasks ¶
func (f Filters) ApplyTasks(ctx context.Context, tasks []taskWithName, mf *manifest.FleetManifest) ([]taskWithName, error)
ApplyTasks filters fleet.RepoTask-style entries (from the local scanner). Only name and manifest-based filters apply since task entries may not carry API metadata.
type GitHubConf ¶
type Plan ¶ added in v0.1.2
type Plan struct {
Fleet string `yaml:"fleet,omitempty"`
All bool `yaml:"all,omitempty"`
JSON bool `yaml:"json,omitempty"`
Shell string `yaml:"shell,omitempty"`
Command string `yaml:"command,omitempty"`
BlockLines int `yaml:"block_lines,omitempty"`
DryRun bool `yaml:"dry_run,omitempty"`
Interactive string `yaml:"interactive,omitempty"`
Filters *Filters `yaml:"filters,omitempty"`
}