releasepr

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DescriptionLanguagePrefix = "rp-prefix"
	DescriptionLanguageSuffix = "rp-suffix"
)
View Source
const (
	MarkdownSectionChangelog = "changelog"
)
View Source
const (
	TitleFormat = "chore(%s): release %s"
)

Variables

View Source
var (
	LabelNextVersionTypeNormal = Label{
		Color:       "EFC15B",
		Name:        "rp-next-version::normal",
		Description: "Request a stable version",
	}
	LabelNextVersionTypeRC = Label{
		Color:       "EFC15B",
		Name:        "rp-next-version::rc",
		Description: "Request a pre-release -rc version",
	}
	LabelNextVersionTypeBeta = Label{
		Color:       "EFC15B",
		Name:        "rp-next-version::beta",
		Description: "Request a pre-release -beta version",
	}
	LabelNextVersionTypeAlpha = Label{
		Color:       "EFC15B",
		Name:        "rp-next-version::alpha",
		Description: "Request a pre-release -alpha version",
	}
)
View Source
var (
	LabelReleasePending = Label{
		Color:       "DEDEDE",
		Name:        "rp-release::pending",
		Description: "Release for this PR is pending",
	}
	LabelReleaseTagged = Label{
		Color:       "0E8A16",
		Name:        "rp-release::tagged",
		Description: "Release for this PR is created",
	}
)
View Source
var (
	TitleRegex = regexp.MustCompile("chore(.*): release (.*)")
)

Functions

This section is empty.

Types

type Label

type Label struct {
	Color       string
	Name        string
	Description string
}

Label is the string identifier of a pull/merge request label on the forge.

type ReleaseOverrides

type ReleaseOverrides struct {
	Prefix          string
	Suffix          string
	NextVersionType versioning.NextVersionType
}

type ReleasePullRequest

type ReleasePullRequest struct {
	git.PullRequest
	Labels []Label

	Head          string
	ReleaseCommit *git.Commit
}

func NewReleasePullRequest

func NewReleasePullRequest(head, branch, version, changelogEntry string) (*ReleasePullRequest, error)

func (*ReleasePullRequest) ChangelogText

func (pr *ReleasePullRequest) ChangelogText() (string, error)

func (*ReleasePullRequest) GetOverrides

func (pr *ReleasePullRequest) GetOverrides() (ReleaseOverrides, error)

func (*ReleasePullRequest) SetDescription

func (pr *ReleasePullRequest) SetDescription(changelogEntry string, overrides ReleaseOverrides) error

func (*ReleasePullRequest) SetTitle

func (pr *ReleasePullRequest) SetTitle(branch, version string)

func (*ReleasePullRequest) Version

func (pr *ReleasePullRequest) Version() (string, error)

Jump to

Keyboard shortcuts

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