changelog

package
v0.0.0-...-18b2753 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2017 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrSHANotLongEnough is the error returned from various functions in this package when a
	// given SHA is not long enough for use
	ErrSHANotLongEnough = errors.New("SHA not long enough")
)
View Source
var (
	// Tpl is the standard changelog template. Execute it with a Values struct
	Tpl = template.Must(template.New("changelog").Parse(tplStr))
)

Functions

func SingleRepoVals

func SingleRepoVals(client *github.Client, vals *Values, sha, name string, includeRepoName bool) ([]string, error)

SingleRepoVals generates a changelog entry from vals.OldRelease to sha. It returns the commits that were unparseable (and had to be skipped) or any error encountered during the process. On a nil error, vals is filled in with all of the sorted changelog entries. Note that any nil commits will not be in the returned string slice

Types

type ByName

type ByName []Values

ByName takes an array of Values structs and sorts in alphabetical order of name

func (ByName) Len

func (v ByName) Len() int

func (ByName) Less

func (v ByName) Less(i, j int) bool

func (ByName) Swap

func (v ByName) Swap(i, j int)

type Values

type Values struct {
	RepoName      string
	OldRelease    string
	NewRelease    string
	Features      []string
	Fixes         []string
	Documentation []string
	Tests         []string
	Maintenance   []string
	Refactors     []string
	Releases      []string
}

Values represents the values that are required to render a changelog

func MergeValues

func MergeValues(oldRel, newRel string, vals []Values) *Values

MergeValues merges all of the slices in vals together into a single Values struct which has OldRelease set to oldRel and NewRelease set to newRel

Jump to

Keyboard shortcuts

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