blog

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatPR

func FormatPR(r io.Reader) ([]byte, error)

FormatPR formats input by replacing pull refs #1234 with markdown links [#1234](...pull/1234)

func FormatRelease

func FormatRelease(author, milestone, changelog string) ([]byte, error)

FormatRelease formats a release template and injects author, milestone, changelog, and merged PR counts

func OpenChangelogPullRequest

func OpenChangelogPullRequest(milestone string) error

OpenChangelogPullRequest attempts to open a browser to the changelog PR of a given milestone

Types

type ChangelogPR

type ChangelogPR struct {
	Items []struct {
		HTMLURL string `json:"html_url"`
	} `json:"items"`
}

ChangelogPR is the API response when searching for the milestone changelog PR

type Merged

type Merged struct {
	TotalCount int `json:"total_count"`
}

Merged is the API response for getting count of merged PRs in a milestone

type Release

type Release struct {
	Name        string    `json:"name"`
	PublishedAt time.Time `json:"published_at"`
}

Release is the API response for a release

func LatestRelease

func LatestRelease() (Release, error)

LatestRelease gets the latest release, used as a default for the generator

Jump to

Keyboard shortcuts

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