Documentation
¶
Overview ¶
Package releaseapproval describes a release as it moves through the release workflow: the Slack message the workflow posts and keeps up to date, and the summary it shows on the workflow run page.
Index ¶
Constants ¶
const MaxPullRequests = 50
MaxPullRequests caps how many pull requests the message lists, so a large release stays within Slack's message limits.
Variables ¶
var Statuses = []Status{StatusWaiting, StatusApproved, StatusReleased, StatusFailed, StatusRejected, StatusCanceled}
Statuses lists every valid Status, in the order a release moves through them.
Functions ¶
func Headline ¶ added in v1.55.20
Headline returns a one-line Slack mrkdwn description of r's status. It opens Message, and on its own is the thread reply posted when the status changes.
Types ¶
type PullRequest ¶
PullRequest is a pull request included in a release.
func ParsePullRequests ¶
func ParsePullRequests(subjects string) []PullRequest
ParsePullRequests extracts the pull requests from commit subjects, one per line, in the order given. Subjects without a trailing "(#123)" are commits pushed without a pull request, and are skipped.
type Release ¶
type Release struct {
ServerURL string // e.g. https://github.com
Repository string // e.g. stripe/stripe-cli
Tag string
PreviousTag string // the latest release before this one
Commit string // full sha of the commit being released
Actor string
RunURL string
Status Status
Approver string // who approved or rejected the release, if known
PullRequests []PullRequest
}
Release describes a release and where it is in the release workflow.
type Status ¶ added in v1.55.20
type Status string
Status is where a release is in the release workflow.
const ( StatusWaiting Status = "waiting" StatusApproved Status = "approved" StatusReleased Status = "released" StatusFailed Status = "failed" StatusRejected Status = "rejected" StatusCanceled Status = "canceled" )
The statuses a release moves through. A release starts out waiting for approval, is approved or rejected, and an approved release ends up released, failed or canceled.