fetcher

package
v0.0.0-...-4e78efc Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	ListWorkflows(ctx context.Context) ([]*Workflow, error)
}

Client is an interface that exposes a subset of the GitHub API

func NewClient

func NewClient(ghClient *github.Client, repoOwner, repoName string) Client

NewClient creates a Client from an existing go-github client.

type Fetcher

type Fetcher interface {
	FindWorkflowRuns(ctx context.Context, workflow *Workflow) ([]*github.WorkflowRun, error)
	DownloadArtifactsForWorkflowRun(ctx context.Context, runID int64, path string) (string, error)
}

Fetcher is an interface that abstracts gathering test results from the github API.

func New

func New(ghClient *github.Client, ui cli.Ui, repoOwner, repoName, branchName string, maxAge time.Duration) (Fetcher, error)

type Workflow

type Workflow struct {
	ID   int64
	Name string
}

Jump to

Keyboard shortcuts

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