Documentation
¶
Index ¶
- Constants
- func GatherReleaseNotes(opts *options.Options) (ReleaseNotes, ReleaseNotesHistory, error)
- func GenerateTOC(input string) (string, error)
- func MatchesExcludeFilter(msg string) bool
- func MatchesIncludeFilter(msg string) bool
- func NoteTextFromString(s string) (string, error)
- type Dependencies
- type DocType
- type Documentation
- type Gatherer
- type MoDiff
- type ReleaseNote
- type ReleaseNotes
- type ReleaseNotesHistory
- type Result
Constants ¶
const ( DefaultOrg = "kubernetes" DefaultRepo = "kubernetes" )
Variables ¶
This section is empty.
Functions ¶
func GatherReleaseNotes ¶ added in v0.3.1
func GatherReleaseNotes(opts *options.Options) (ReleaseNotes, ReleaseNotesHistory, error)
GatherReleaseNotes creates a new gatherer and collects the release notes afterwards
func GenerateTOC ¶ added in v0.2.1
func MatchesExcludeFilter ¶ added in v0.3.1
MatchesExcludeFilter returns true if the string matches an excluded release note
func MatchesIncludeFilter ¶ added in v0.3.1
MatchesIncludeFilter returns true if the string matches an included release note
func NoteTextFromString ¶
NoteTextFromString returns the text of the release note given a string which may contain the commit message, the PR description, etc. This is generally the content inside the ```release-note ``` stanza.
Types ¶
type Dependencies ¶ added in v0.3.2
type Dependencies struct {
// contains filtered or unexported fields
}
func NewDependencies ¶ added in v0.3.2
func NewDependencies() *Dependencies
func (*Dependencies) Changes ¶ added in v0.3.2
func (d *Dependencies) Changes(from, to string) (string, error)
Changes collects the dependency change report as markdown between both provided revisions. The function errors if anything went wrong.
func (*Dependencies) ChangesForURL ¶ added in v0.3.2
func (d *Dependencies) ChangesForURL(url, from, to string) (string, error)
Changes collects the dependency change report as markdown between both provided revisions for the specified repository URL. The function errors if anything went wrong.
func (*Dependencies) SetMoDiff ¶ added in v0.3.2
func (d *Dependencies) SetMoDiff(moDiff MoDiff)
SetMoDiff can be used to set the internal MoDiff implementation
type Documentation ¶
type Documentation struct { // A description about the documentation Description string `json:"description,omitempty"` // The url to be linked URL string `json:"url"` // Classifies the link as something special, like a KEP Type DocType `json:"type"` }
func DocumentationFromString ¶
func DocumentationFromString(s string) []*Documentation
type Gatherer ¶ added in v0.2.1
type Gatherer struct {
// contains filtered or unexported fields
}
func NewGatherer ¶ added in v0.2.2
NewGatherer creates a new notes gatherer
func NewGathererWithClient ¶ added in v0.2.2
NewGathererWithClient creates a new notes gatherer with a specific client
func (*Gatherer) ListReleaseNotes ¶ added in v0.2.1
func (g *Gatherer) ListReleaseNotes() (ReleaseNotes, ReleaseNotesHistory, error)
ListReleaseNotes produces a list of fully contextualized release notes starting from a given commit SHA and ending at starting a given commit SHA.
func (*Gatherer) ReleaseNoteFromCommit ¶ added in v0.2.1
func (g *Gatherer) ReleaseNoteFromCommit(result *Result, relVer string) (*ReleaseNote, error)
ReleaseNoteFromCommit produces a full contextualized release note given a GitHub commit API resource.
type ReleaseNote ¶
type ReleaseNote struct { // Commit is the SHA of the commit which is the source of this note. This is // also effectively a unique ID for release notes. Commit string `json:"commit"` // Text is the actual content of the release note Text string `json:"text"` // Markdown is the markdown formatted note Markdown string `json:"markdown"` // Docs is additional documentation for the release note Documentation []*Documentation `json:"documentation,omitempty"` // Author is the GitHub username of the commit author Author string `json:"author"` // AuthorURL is the GitHub URL of the commit author AuthorURL string `json:"author_url"` // PrURL is a URL to the PR PrURL string `json:"pr_url"` // PrNumber is the number of the PR PrNumber int `json:"pr_number"` // Areas is a list of the labels beginning with area/ Areas []string `json:"areas,omitempty"` // Kinds is a list of the labels beginning with kind/ Kinds []string `json:"kinds,omitempty"` // SIGs is a list of the labels beginning with sig/ SIGs []string `json:"sigs,omitempty"` // Indicates whether or not a note will appear as a new feature Feature bool `json:"feature,omitempty"` // Indicates whether or not a note is duplicated across SIGs Duplicate bool `json:"duplicate,omitempty"` // Indicates whether or not a note is duplicated across Kinds DuplicateKind bool `json:"duplicate_kind,omitempty"` // ActionRequired indicates whether or not the release-note-action-required // label was set on the PR ActionRequired bool `json:"action_required,omitempty"` // Tags each note with a release version if specified // If not specified, omitted ReleaseVersion string `json:"release_version,omitempty"` }
ReleaseNote is the type that represents the total sum of all the information we've gathered about a single release note.
type ReleaseNotes ¶ added in v0.2.0
type ReleaseNotes map[int]*ReleaseNote
ReleaseNotes is a map of PR numbers referencing notes. To avoid needless loops, we need to be able to reference things by PR When we have to merge old and new entries, we want to be able to override the old entries with the new ones efficiently.
type ReleaseNotesHistory ¶ added in v0.2.0
type ReleaseNotesHistory []int
ReleaseNotesHistory is the sorted list of PRs in the commit history