releaseapproval

package
v1.55.20 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2026 License: Apache-2.0 Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

View Source
const MaxPullRequests = 50

MaxPullRequests caps how many pull requests the message lists, so a large release stays within Slack's message limits.

Variables

Statuses lists every valid Status, in the order a release moves through them.

Functions

func Headline added in v1.55.20

func Headline(r Release) string

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.

func Message

func Message(r Release) string

Message returns the Slack mrkdwn text describing r and its status, followed by the pull requests it includes. The workflow posts it once and then edits it as the status changes.

func Summary

func Summary(r Release) string

Summary returns the GitHub-flavored markdown shown on the workflow run page, so approvers can see exactly what they are approving. Unlike Message, it lists every pull request.

Types

type PullRequest

type PullRequest struct {
	Number string
	Title  string
}

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.

func (Status) Valid added in v1.55.20

func (s Status) Valid() bool

Valid reports whether s is one of Statuses.

Directories

Path Synopsis
Command release-approval-message reads commit subjects on stdin, one per line, and describes the release and its --status.
Command release-approval-message reads commit subjects on stdin, one per line, and describes the release and its --status.

Jump to

Keyboard shortcuts

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