Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var TypeValues = []string{
"enhancement",
"improvement",
"feature",
"bug",
"note",
"new-resource",
"new-datasource",
"new-ephemeral",
"new-function",
"new-action",
"deprecation",
"breaking-change",
}
Functions ¶
Types ¶
type Entry ¶
func (*Entry) Validate ¶
func (e *Entry) Validate() *EntryValidationError
Validates that an Entry body contains properly formatted changelog notes
type EntryErrorCode ¶
type EntryErrorCode string
const ( EntryErrorNotFound EntryErrorCode = "NOT_FOUND" EntryErrorUnknownTypes EntryErrorCode = "UNKNOWN_TYPES" )
type EntryList ¶
type EntryList struct {
// contains filtered or unexported fields
}
EntryList provides thread-safe operations on a list of Entry values
func Diff ¶
Diff returns the slice of Entry values that represent the difference of entries in the dir directory within repo from ref1 revision to ref2 revision. ref1 and ref2 should be valid git refs as strings and dir should be a valid directory path in the repository.
The function calculates the diff by first checking out ref2 and collecting the set of all entries in dir. It then checks out ref1 and subtracts the entries found in dir. The resulting set of entries is then filtered to exclude any entries that came before the commit date of ref1.
It clones the repository into memory for processing, so makes no changes to the local filesystem, but may use significant memory for large repositories.
Along the way, if any git or filesystem interactions fail, an error is returned.
func DiffLocal ¶
DiffLocal returns a list of entries that are present in ref1 but not in ref2 within the local git repository at repoPath.
It calculates the list the same way as Diff, but operates on the local filesystem rather than cloning the repo into memory.
Since it operates on the local filesystem, it will modify repository state. Namely, it checks out each ref, leaving whatever branch or other ref is currently checked out. Use with caution, preferably on a clean clone.
func NewEntryList ¶
NewEntryList returns an EntryList with capacity c
func (*EntryList) Set ¶
Set sets the Entry at index i. The list will be resized if i is larger than the current list capacity.
func (*EntryList) SortByIssue ¶
func (el *EntryList) SortByIssue()
SortByIssue does an in-place sort of the entries by their issue number.
type EntryValidationError ¶
type EntryValidationError struct {
Code EntryErrorCode
Details map[string]interface{}
// contains filtered or unexported fields
}
func (*EntryValidationError) Error ¶
func (e *EntryValidationError) Error() string
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
changelog-build
command
|
|
|
changelog-check
command
|
|
|
changelog-entry
command
|
|
|
changelog-pr-body-check
command
|