checks

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package checks provides GitHub check runs operations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllChecksPassed

func AllChecksPassed(checks []*github.CheckRun) bool

AllChecksPassed returns true if all check runs completed successfully.

func GetCheckRun

func GetCheckRun(ctx context.Context, gh *github.Client, owner, repo string, checkRunID int64) (*github.CheckRun, error)

GetCheckRun retrieves a specific check run by ID.

func ListCheckRuns

func ListCheckRuns(ctx context.Context, gh *github.Client, owner, repo, ref string) ([]*github.CheckRun, error)

ListCheckRuns lists check runs for a commit SHA or branch.

func ListCheckRunsForPR

func ListCheckRunsForPR(ctx context.Context, gh *github.Client, owner, repo string, prNumber int) ([]*github.CheckRun, error)

ListCheckRunsForPR lists check runs for a pull request.

func ListCheckSuites

func ListCheckSuites(ctx context.Context, gh *github.Client, owner, repo, ref string) ([]*github.CheckSuite, error)

ListCheckSuites lists check suites for a commit.

func WaitForChecks

func WaitForChecks(ctx context.Context, gh *github.Client, owner, repo, ref string, timeout, pollInterval time.Duration) ([]*github.CheckRun, bool, error)

WaitForChecks polls until all checks complete or timeout. Returns the final check runs and whether all passed.

Types

type ChecksStatus

type ChecksStatus struct {
	Total      int
	Passed     int
	Failed     int
	Pending    int
	AllPassed  bool
	AnyFailed  bool
	AnyPending bool
}

ChecksStatus represents the aggregate status of check runs.

func GetChecksStatus

func GetChecksStatus(checks []*github.CheckRun) *ChecksStatus

GetChecksStatus returns aggregate status of check runs.

Jump to

Keyboard shortcuts

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