Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildChangelog ¶
Types ¶
type ReleaseNote ¶
type ReleaseNote struct { // Text is the actual content of the release note Text string `json:"text"` // 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"` //PRDate is the Date the PR was merged PRDate time.Time `json:"pr_date"` // PRUrl is a URL to the PR PRURL string `json:"pr_url"` // PRNumber is the number of the PR PRNumber int `json:"pr_number"` // Labels is a list of all the labels on the PR. Labels []string `labels:"areas,omitempty"` // Indicates whether or not a note will appear as a bug (`bug` label). Bug bool `json:"bug,omitempty"` // BreakingChange indicates if this change was breaking (the // `breaking-change` label was applied to the PR). BreakingChange bool `json:"breaking_change,omitempty"` // Type is the type of entry the ReleaseNote is Type string }
ReleaseNote is the type that represents the total sum of all the information we've gathered about a single release note.
type ReleaseNoteEntry ¶ added in v1.1.0
ReleaseNoteEntry is a struct containing the type of entry and the body of the entry. One or more ReleaseNoteEntry is extracted from a PR, and represents a single item within the release notes.
func ReleaseNoteBlocks ¶ added in v1.1.0
func ReleaseNoteBlocks(title, body string) []ReleaseNoteEntry
ReleaseNoteBlocks accepts the PR title and body contents, and parses them into one or more `ReleaseNoteEntry`s. It first attempts to find explicit releasenote code blocks within the body, and failing that, falls back on using the PR title as long as it is not empty.
Click to show internal directories.
Click to hide internal directories.