summary

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package summary writes to the GitHub Actions job summary.

registry.json is stored on one line: nothing reads it by eye, and the indentation is 30% of the bytes every aqua user downloads while costing nothing in the repository, where git compresses it away. The indented form is written here instead, so that what a run produced can still be read when someone needs to.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Problem added in v0.0.9

type Problem struct {
	Package string
	Version string
	Reason  string
}

Problem is a version a run didn't publish, and why.

type Rename added in v0.0.20

type Rename struct {
	From string
	To   string
}

Rename is a repository that isn't where the registry says it is.

type Writer

type Writer struct {
	// contains filtered or unexported fields
}

Writer appends to the job summary. A Writer with no path does nothing, which is what happens outside GitHub Actions.

func New

func New() *Writer

New creates a Writer for the current job.

func (*Writer) Add

func (w *Writer) Add(pkgName string, versions map[string]any) error

Add writes one package's generated files to the summary, indented.

func (*Writer) Problems added in v0.0.9

func (w *Writer) Problems(problems []*Problem) error

Problems writes what the run couldn't publish.

A version whose signature can't be verified isn't published, and the next run tries it again, so a release that has genuinely stopped being signed produces nothing but a line in a log nobody reads. Here it is where the run is read.

It is written whatever the summary already holds. The budget the generated files spend is under what GitHub accepts, and this is the part worth keeping when they have used the rest.

func (*Writer) Progress added in v0.0.26

func (w *Writer) Progress(p *state.Progress) error

Progress writes how far the registry has got.

A run is read for what it generated, which says nothing about how much is left. The backfill is the whole of what the registry is doing for now, and this is the only place the numbers exist: the repository can be counted for branches, and the turns each package has had are in the state and nowhere else.

func (*Writer) Renames added in v0.0.20

func (w *Writer) Renames(renames []*Rename) error

Renames writes the repositories the sweep found have been renamed.

The sweep asks every repository what it is called, and GitHub answers a query made with an old name, so this costs nothing to find out. Nothing is done about it yet: the branch holding a package's generated versions is named after the name the registry has, and moving it is a run of its own.

Written where the run is read rather than left in the log, because it is the registry being out of date about what a package is. That stays true until somebody acts on it, and a line in a log nobody reads is how it would stay that way.

Jump to

Keyboard shortcuts

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