logs

package
v0.44.5 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2026 License: Apache-2.0 Imports: 10 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 logs reads a bounded excerpt of a failing check's output. A rule matches its signal against that excerpt, never against a check name alone.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CarriesFailure added in v0.34.2

func CarriesFailure(excerpt string) bool

CarriesFailure reports whether an excerpt holds a line that names a failure. An excerpt of a build that was cancelled holds the output of steps that succeeded, and nothing in it says what went wrong.

func PlainText added in v0.17.0

func PlainText(excerpt string) string

PlainText is an excerpt with nothing in it that a person did not write: no colour, no per-line timestamp, no carriage return.

Types

type Fetcher

type Fetcher struct {
	GitHub   *github.Client
	CircleCI *circleci.Client
	// HTTP downloads the redirect target of an Actions job log. Nil uses a
	// client with a timeout of its own.
	HTTP *http.Client
}

Fetcher reads check logs. A source with no client returns no excerpt, and a rule that needs it does not match.

func (*Fetcher) Actions

func (f *Fetcher) Actions(ctx context.Context, owner, repo, detailsURL string, maxBytes int) (string, bool)

Actions returns the tail of one GitHub Actions job log. detailsURL is the check run's details URL.

func (*Fetcher) CircleCIBuild

func (f *Fetcher) CircleCIBuild(ctx context.Context, targetURL string, maxBytes int) (string, bool)

CircleCIBuild returns the output of the failing actions of a CircleCI build, newest step last, bounded by maxBytes.

Jump to

Keyboard shortcuts

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