logs

package
v0.17.2 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

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 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