config

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrConfigFileCantBeRead when config file cannot be read.
	ErrConfigFileCantBeRead = errors.New("config file can't be read")
	// ErrConfigFileHaveInvalidFormat when config file has invalid format.
	ErrConfigFileHaveInvalidFormat = errors.New("config file have invalid format")
)

Functions

This section is empty.

Types

type Branches

type Branches struct {
	Main             string `valid:"required"        yaml:"main"`
	ReleaseNext      string `valid:"required"        yaml:"releaseNext"`
	SynchCI          string `valid:"required"        yaml:"synchCi"`
	ReleaseTemplates `yaml:"releaseTemplates"`
	Searches         `yaml:"searches"`
}

Branches holds configuration for branches.

type Config

type Config struct {
	Upstream                   string `valid:"required"      yaml:"upstream"`
	Downstream                 string `valid:"required"      yaml:"downstream"`
	DryRun                     bool   `yaml:"dryRun"`
	GithubWorkflowsRemovalGlob string `valid:"required"      yaml:"githubWorkflowsRemovalGlob"`
	ResyncReleases             `yaml:"resyncReleases"`
	Branches                   `yaml:"branches"`
	Tags                       `yaml:"tags"`
	Messages                   `yaml:"messages"`
	SyncLabels                 []string `valid:"required"      yaml:"syncLabels"`
}

Config for a deviate to operate.

func New

func New(
	project Project,
	log log.Logger,
	informer git.RemoteURLInformer,
) (Config, error)

New creates a new default configuration.

type Messages added in v0.3.0

type Messages struct {
	TriggerCI      string `valid:"required" yaml:"triggerCi"`
	TriggerCIBody  string `valid:"required" yaml:"triggerCiBody"`
	ApplyForkFiles string `valid:"required" yaml:"applyForkFiles"`
}

Messages holds messages that are used to commit changes and create PRs.

type Project

type Project struct {
	Path       string
	ConfigPath string
}

Project information.

type ReleaseTemplates

type ReleaseTemplates struct {
	Upstream   string `valid:"required" yaml:"upstream"`
	Downstream string `valid:"required" yaml:"downstream"`
}

ReleaseTemplates contains templates for release names.

type ResyncReleases added in v0.3.0

type ResyncReleases struct {
	Enabled  bool `yaml:"enabled"`
	NumberOf int  `yaml:"numberOf"`
}

ResyncReleases holds configuration for resyncing past releases.

type Searches

type Searches struct {
	UpstreamReleases   string `valid:"required" yaml:"upstreamReleases"`
	DownstreamReleases string `valid:"required" yaml:"downstreamReleases"`
}

Searches contains regular expressions used to search for branches.

type Tags added in v0.2.0

type Tags struct {
	Synchronize bool   `yaml:"synchronize"`
	RefSpec     string `valid:"required"   yaml:"refSpec"`
}

Tags holds configuration for tags.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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