Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GitHubContentsFetcher ¶
type GitHubContentsFetcher interface {
GetInstallationClient(ctx context.Context, installationID int64) (*github.Client, error)
}
GitHubContentsFetcher is the interface the loader needs from the GitHub client.
type Loader ¶
type Loader struct {
// contains filtered or unexported fields
}
Loader fetches and parses repository configuration files.
func NewLoader ¶
func NewLoader(gh GitHubContentsFetcher) *Loader
NewLoader creates a new config Loader.
func (*Loader) LoadRepoConfig ¶
func (l *Loader) LoadRepoConfig(ctx context.Context, installationID int64, owner, repo string) (RepoConfig, error)
LoadRepoConfig fetches and parses the repo config file. Returns an empty RepoConfig (not an error) if no file exists.
type RepoConfig ¶
type RepoConfig struct {
Project string `yaml:"project"`
Type string `yaml:"type"`
Assign *bool `yaml:"assign"`
UpdateTitle string `yaml:"update-title"`
Fields map[string]interface{} `yaml:"fields"`
}
RepoConfig represents the per-repository configuration loaded from a YAML file.
func ParseRepoConfig ¶
func ParseRepoConfig(data []byte) (RepoConfig, error)
ParseRepoConfig parses YAML bytes into a RepoConfig. Returns an empty RepoConfig for empty input. Returns an error for invalid YAML.
func (RepoConfig) IsEmpty ¶
func (rc RepoConfig) IsEmpty() bool
IsEmpty returns true if no values are configured.
Click to show internal directories.
Click to hide internal directories.