changelog

package
v0.56.1 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Change

type Change struct {
	// Fetched from git log.
	Hash    string
	Author  string
	Subject string
	Body    string

	Issues []int

	// Resolved from GitHub.
	Username string
}

Change represents a git commit.

type Changes

type Changes []Change

Changes represents a list of git commits.

func CollectChanges

func CollectChanges(opts Options) (Changes, error)

CollectChanges collects changes according to the given options. If opts.ResolveUserName is set, it will be used to resolve Change.Username (e.g. GitHub login).

type Options

type Options struct {
	// Can be nil.
	// ResolveUserName returns the username for the given author (email address) and commit sha.
	// This is the GitHub login (e.g. bep) in its first iteration.
	ResolveUserName func(commit, author string) (string, error)

	// All of these can be empty.
	PrevTag   string
	Tag       string
	Commitish string
	RepoPath  string
}

Options for collecting changes.

type TitleChanges

type TitleChanges struct {
	Title   string
	Changes Changes
	// contains filtered or unexported fields
}

TitleChanges represents a list of changes grouped by title.

func GroupByTitleFunc added in v0.11.0

func GroupByTitleFunc(g Changes, f func(Change) (string, int, bool)) ([]TitleChanges, error)

GroupByTitleFunc groups g by title according to the grouping function f. If f returns false, that change item is not included in the result.

Jump to

Keyboard shortcuts

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