github

package
v0.0.0-...-bce4990 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	StatusQueued  = "queued"
	StatusPending = "pending"
	StatusWaiting = "waiting"
	StatusWorking = "in_progress"

	StatusSuccess        = "success"
	StatusFailure        = "failure"
	StatusCancelled      = "cancelled"
	StatusTimeout        = "timed_out"
	StatusNeutral        = "neutral"
	StatusSkipped        = "skipped"
	StatusActionRequired = "action_required"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type GH

type GH struct {
	TriggerNewBuild func(t testing.TB, ctx context.Context, owner, repo, token, commitSha string, runID int64) (int64, string, string, error)
	// contains filtered or unexported fields
}

func NewGH

func NewGH() GH

NewGH creates a new wrapper for The GitHub API

func (GH) GetActionState

func (g GH) GetActionState(t testing.TB, ctx context.Context, owner, repo, token string, runID int64) (string, string, error)

GetActionState returns the state of a given action

func (GH) GetBuildLogs

func (g GH) GetBuildLogs(t testing.TB, ctx context.Context, owner, repo, token string, runID int64) (string, error)

GetBuildLogs returns the execution logs of an action

func (GH) GetFinalActionState

func (g GH) GetFinalActionState(t testing.TB, ctx context.Context, owner, repo, token string, runID int64, maxBuildRetry int) (string, string, error)

GetFinalActionState returns the final state of an action

func (GH) GetLastActionState

func (g GH) GetLastActionState(t testing.TB, ctx context.Context, owner, repo, token, commitSha string) (int64, string, string, error)

GetLastActionState returns the state of the latest action

func (GH) WaitBuildSuccess

func (g GH) WaitBuildSuccess(t testing.TB, owner, repo, token, commitSha, failureMsg string, maxBuildRetry, maxErrorRetries int, timeBetweenErrorRetries time.Duration) error

WaitBuildSuccess waits for the current build in a repo to finish.

Jump to

Keyboard shortcuts

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