config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultConfig []byte

Functions

This section is empty.

Types

type Config

type Config struct {
	Repo       string         `yaml:"repo"`
	Service    string         `yaml:"service"`
	BaseURL    string         `yaml:"base-url"`
	Groups     []Group        `yaml:"groups"`
	SkipLabels string         `yaml:"skip-labels"`
	SkipRegex  *regexp.Regexp `yaml:"-"`
}

Config is the changelog settings

func New

func New(configPath string) (*Config, error)

New Load a config from a path, defaulting to changelog.example.yml

func (Config) NameLabels added in v1.0.0

func (c Config) NameLabels() []NameLabel

NameLabels returns a slice of NameLabel for each Group, keeping them in order (priority)

type Group

type Group struct {
	Name    string   `yaml:"name"`
	Labels  []string `yaml:"labels"`
	Default bool     `yaml:"default"`
}

Group is a grouping of PRs

func (Group) NameLabels added in v1.0.0

func (g Group) NameLabels() []NameLabel

NameLabels returns a slice of NameLabel

type NameLabel added in v1.0.0

type NameLabel struct {
	Name  string
	Label string
}

NameLabel is a Group mapping for a Label to a Name

Jump to

Keyboard shortcuts

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