Documentation
¶
Overview ¶
Package config handles configuration loading and validation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var AvailableProviders = Providers{ProviderGitHub, ProviderBitbucketServer}
AvailableProviders contains all valid provider values.
var AvailableWorkflows = Workflows{WorkflowDirect, WorkflowPR}
AvailableWorkflows contains all valid workflow values.
Functions ¶
This section is empty.
Types ¶
type BitbucketConfig ¶ added in v0.45.0
BitbucketConfig holds Bitbucket Server-specific configuration.
type Config ¶
type Config struct {
ProjectName string `yaml:"projectName"`
Workflow Workflow `yaml:"workflow"`
PR bool `yaml:"pr,omitempty"`
Worktree bool `yaml:"worktree,omitempty"`
DefaultBranch string `yaml:"defaultBranch"`
Prompts PromptsConfig `yaml:"prompts"`
Specs SpecsConfig `yaml:"specs"`
ContainerImage string `yaml:"containerImage"`
NetrcFile string `yaml:"netrcFile"`
GitconfigFile string `yaml:"gitconfigFile"`
Model string `yaml:"model"`
ValidationCommand string `yaml:"validationCommand"`
DebounceMs int `yaml:"debounceMs"`
ServerPort int `yaml:"serverPort"`
AutoMerge bool `yaml:"autoMerge"`
AutoRelease bool `yaml:"autoRelease"`
VerificationGate bool `yaml:"verificationGate"`
AutoReview bool `yaml:"autoReview"`
MaxReviewRetries int `yaml:"maxReviewRetries"`
AllowedReviewers []string `yaml:"allowedReviewers,omitempty"`
UseCollaborators bool `yaml:"useCollaborators"`
PollIntervalSec int `yaml:"pollIntervalSec"`
GitHub GitHubConfig `yaml:"github"`
Provider Provider `yaml:"provider"`
Bitbucket BitbucketConfig `yaml:"bitbucket"`
Env map[string]string `yaml:"env,omitempty"`
}
Config holds the dark-factory configuration.
func (Config) ResolvedBitbucketToken ¶ added in v0.45.0
ResolvedBitbucketToken reads the Bitbucket token from the env var named in TokenEnv. Returns empty string when not configured or env var is empty. Uses os.Getenv directly (not resolveEnvVar) because tokenEnv holds the env var name (e.g. "BITBUCKET_TOKEN"), not a ${VAR} reference that resolveEnvVar expects.
func (Config) ResolvedGitHubToken ¶ added in v0.15.0
ResolvedGitHubToken returns the GitHub token with environment variables resolved. Returns empty string when not configured, letting gh use its own auth.
type GitHubConfig ¶ added in v0.15.0
type GitHubConfig struct {
Token string `yaml:"token"`
}
GitHubConfig holds GitHub-specific configuration.
type PromptsConfig ¶ added in v0.20.3
type PromptsConfig struct {
InboxDir string `yaml:"inboxDir"`
InProgressDir string `yaml:"inProgressDir"`
CompletedDir string `yaml:"completedDir"`
LogDir string `yaml:"logDir"`
}
PromptsConfig holds directories for the prompt lifecycle.
type Provider ¶ added in v0.45.0
type Provider string
Provider is a string-based enum for git provider types.
Provider selects the git hosting provider for PR operations.
type Providers ¶ added in v0.45.0
type Providers []Provider
Providers is a collection of Provider values.
type SpecsConfig ¶ added in v0.20.3
type SpecsConfig struct {
InboxDir string `yaml:"inboxDir"`
InProgressDir string `yaml:"inProgressDir"`
CompletedDir string `yaml:"completedDir"`
LogDir string `yaml:"logDir"`
}
SpecsConfig holds directories for the spec lifecycle.