announce

package
v0.16.1 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2026 License: MIT Imports: 22 Imported by: 0

Documentation

Overview

Package announce implements the `announce` verb: tell people a release happened, through the adapters .colophon.yaml configures.

Index

Constants

This section is empty.

Variables

View Source
var DefaultAuthor = object.Signature{Name: "colophon", Email: "colophon@phpboyscout.uk"}

DefaultAuthor is attributed to a commit an adapter makes when the verb running it has no author flags of its own (`release`).

View Source
var ErrNoRelease = errors.New("announce: no release to announce")

ErrNoRelease reports a tag carrying no release object. Announcing one that does not exist would put out a link to nothing.

View Source
var ErrTagRequired = errors.New("announce: --tag names the release to announce")

ErrTagRequired reports a run with no release named.

View Source
var ErrUnknownAdapter = errors.New("announce: no such adapter")

ErrUnknownAdapter reports an adapter the manifest names and colophon does not have.

Functions

func NewCmdAnnounce

func NewCmdAnnounce(props *props.Props) *setup.Command

func OperatorAnnounce added in v0.13.0

func OperatorAnnounce(p *props.Props) ([]manifest.Announce, error)

OperatorAnnounce reads the operator's announce block from the configuration layer: settings an adapter inherits when the manifest names it with nothing of its own (spec 0026 D2). No configuration is no block.

func Run

func Run(ctx context.Context, p *props.Props, opts *AnnounceOptions, w io.Writer) error

Run is RunAnnounce with its output injected.

func RunAnnounce

func RunAnnounce(ctx context.Context, p *props.Props, opts *AnnounceOptions, _ []string) error

RunAnnounce is the `announce` verb.

func Withheld added in v0.13.0

func Withheld(w io.Writer, tags []string) error

Withheld says a release was created and deliberately not announced.

Types

type AnnounceOptions

type AnnounceOptions struct {
	Tag         string
	Forge       string
	Repo        string
	Remote      string
	AuthorName  string
	AuthorEmail string
}

type Created added in v0.13.0

type Created struct {
	Root     string
	Settings manifest.Manifest
	Origin   remote.Remote
	Reader   release.Reader
	Provider forge.Provider
	Author   object.Signature

	// Adapters, when set, stands in for what the manifest configures.
	Adapters []libannounce.Configured
}

Created announces the releases a run just created, for publish and release (spec 0026 D1). Nothing is printed when the manifest names no adapter: a project that did not opt in sees no change to its report.

func (Created) Do added in v0.13.0

func (c Created) Do(ctx context.Context, p *props.Props, w io.Writer, tags []string) error

Do announces each tag and writes the report under an `announce` heading.

Jump to

Keyboard shortcuts

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