config

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

type Repository struct {
	Name          string   `yaml:"name" mapstructure:"name"`
	Directory     string   `yaml:"directory" mapstructure:"directory"`
	DefaultLabels string   `yaml:"default_labels" mapstructure:"default_labels"`
	ReadyLabel    string   `yaml:"ready_label" mapstructure:"ready_label"`
	ReadyStatus   string   `yaml:"ready_status" mapstructure:"ready_status"`
	UnreadyLabel  string   `yaml:"unready_label" mapstructure:"unready_label"`
	UnreadyStatus string   `yaml:"unready_status" mapstructure:"unready_status"`
	GithubRepo    string   `yaml:"github_repo" mapstructure:"github_repo"`
	GitlabRepo    string   `yaml:"gitlab_repo" mapstructure:"gitlab_repo"`
	DefaultBranch string   `yaml:"default_branch" mapstructure:"default_branch"`
	Worktree      Worktree `yaml:"worktree,omitempty" mapstructure:"worktree"`
}

Repository represents a single repository configuration

func (*Repository) IsCodeRepo added in v0.6.1

func (r *Repository) IsCodeRepo() bool

IsCodeRepo returns true if the repository has a directory configured (i.e., it's a code repo)

type Settings

type Settings struct {
	ReadyLabel    string       `yaml:"ready_label" mapstructure:"ready_label"`
	ReadyStatus   string       `yaml:"ready_status" mapstructure:"ready_status"`
	UnreadyLabel  string       `yaml:"unready_label" mapstructure:"unready_label"`
	UnreadyStatus string       `yaml:"unready_status" mapstructure:"unready_status"`
	Repositories  []Repository `yaml:"repositories" mapstructure:"repositories"`
}

Settings represents the root configuration

func Load

func Load() (*Settings, error)

Load reads the configuration from the specified file

func (*Settings) GetRepo

func (s *Settings) GetRepo(name string) *Repository

GetRepo returns a repository by name

func (*Settings) GetRepoNames

func (s *Settings) GetRepoNames() []string

GetRepoNames returns a list of repository names

type Worktree

type Worktree struct {
	DefaultBranch string `yaml:"default_branch" mapstructure:"default_branch"`
	Enabled       bool   `yaml:"enabled" mapstructure:"enabled"`
}

Worktree represents worktree configuration

Jump to

Keyboard shortcuts

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