change

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UnknownType = NewType("unknown", SemVerUnknown)
View Source
var UnknownTypes = []Type{UnknownType}

Functions

func ContainsAny

func ContainsAny(query, against []Type) bool

Types

type Change

type Change struct {
	Text        string      // title or short summary describing the change (e.g. GitHub issue or PR title)
	ChangeTypes []Type      // the kind(s) of change(s) this specific change description represents (e.g. breaking, enhancement, patch, etc.)
	Timestamp   time.Time   // the timestamp best representing when the change was committed to the VCS baseline (e.g. GitHub PR merged).
	References  []Reference // any URLs that relate to the change
	EntryType   string      // a free-form helper string that indicates where the change came from (e.g. a "github-issue"). This can be useful for parsing the `Entry` field.
	Entry       interface{} // the original data entry from the source that represents the change. The `EntryType` field should be used to help indicate how the shape should be interpreted.
}

Change represents the smallest unit within a release that can be summarized.

type Changes

type Changes []Change

func (Changes) ByChangeType

func (s Changes) ByChangeType(types ...Type) (result Changes)

ByChangeType returns the set of changes that match one of the given change types.

type Reference

type Reference struct {
	Text string
	URL  string
}

Reference indicates where you can find additional information about a particular change.

type SemVerKind added in v0.4.0

type SemVerKind int
const (
	SemVerUnknown SemVerKind = iota
	SemVerPatch
	SemVerMinor
	SemVerMajor
)

func ParseSemVerKind added in v0.4.0

func ParseSemVerKind(semver string) SemVerKind

func Significance added in v0.4.0

func Significance(changes []Change) SemVerKind

func (SemVerKind) String added in v0.4.0

func (f SemVerKind) String() string

type Type

type Type struct {
	Name string
	Kind SemVerKind
}

Type is the kind of change made (e.g. a bug, enhancement, breaking-change, etc.) and how that relates to a software version (e.g. should bump the patch semver field)

func NewType added in v0.4.0

func NewType(name string, kind SemVerKind) Type

type TypeSet

type TypeSet map[string]Type

TypeSet is a unique set of types indexed by their name

func (TypeSet) ChangeTypes

func (l TypeSet) ChangeTypes(labels ...string) (results []Type)

func (TypeSet) Names

func (l TypeSet) Names() (results []string)

type TypeTitle

type TypeTitle struct {
	ChangeType Type
	Title      string
}

TypeTitle is a changetype paired with the section title that should be used in the changelog.

type TypeTitles

type TypeTitles []TypeTitle

func (TypeTitles) Types

func (tts TypeTitles) Types() (ty []Type)

Jump to

Keyboard shortcuts

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