document

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: May 12, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDownloadsTable added in v0.2.6

func CreateDownloadsTable(w io.Writer, bucket, tars, prevTag, newTag string) error

CreateDownloadsTable creates the markdown table with the links to the tarballs. The function does nothing if the `tars` variable is empty.

Types

type Document

type Document struct {
	NotesWithActionRequired Notes          `json:"action_required"`
	Notes                   NoteCollection `json:"notes"`
	Downloads               *FileMetadata  `json:"downloads"`
	CurrentRevision         string         `json:"release_tag"`
	PreviousRevision        string
}

Document represents the underlying structure of a release notes document.

func GatherReleaseNotesDocument added in v0.3.1

func GatherReleaseNotesDocument(
	opts *options.Options, previousRev, currentRev string,
) (*Document, error)

GatherReleaseNotesDocument creates a new gatherer and collects the release notes into a fresh document

func New added in v0.3.1

func New(
	releaseNotes notes.ReleaseNotes,
	history notes.ReleaseNotesHistory,
	previousRev, currentRev string,
) (*Document, error)

New assembles an organized document from an unorganized set of release notes

func (*Document) RenderMarkdownTemplate added in v0.2.6

func (d *Document) RenderMarkdownTemplate(bucket, fileDir, templateSpec string) (string, error)

RenderMarkdownTemplate renders a document using the golang template in `templateSpec`. If `templateSpec` is set to `options.FormatDefaultGoTemplate` render using the default template (markdown format).

type File added in v0.2.6

type File struct {
	Checksum, Name, URL string
}

A File is a downloadable file.

type FileMetadata added in v0.2.6

type FileMetadata struct {
	// Files containing source code
	Source []File

	// Client binaries
	Client []File

	// Server binaries
	Server []File

	// Node binaries
	Node []File
}

FileMetadata contains metadata about files associated with the release.

type Kind

type Kind string

TODO: These should probably go into the notes package.

const (
	KindAPIChange     Kind = "api-change"
	KindBug           Kind = "bug"
	KindCleanup       Kind = "cleanup"
	KindDeprecation   Kind = "deprecation"
	KindDesign        Kind = "design"
	KindDocumentation Kind = "documentation"
	KindFailingTest   Kind = "failing-test"
	KindFeature       Kind = "feature"
	KindFlake         Kind = "flake"
	KindRegression    Kind = "regression"
	KindOther         Kind = "Other (Cleanup or Flake)"
	KindUncategorized Kind = "Uncategorized"
)

TODO: These should probably go into the notes package.

type NoteCategory added in v0.2.7

type NoteCategory struct {
	Kind        Kind
	NoteEntries *Notes
}

NoteCategory contains notes of the same `Kind` (i.e category).

type NoteCollection added in v0.2.7

type NoteCollection []NoteCategory

NoteCollection is a collection of note categories.

func (*NoteCollection) Sort added in v0.2.7

func (n *NoteCollection) Sort(kindPriority []Kind)

Sort sorts the collection by priority order.

type Notes

type Notes []string

type NotesByKind

type NotesByKind map[Kind]Notes

Jump to

Keyboard shortcuts

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