Documentation
¶
Overview ¶
Package checks provides GitHub check runs operations.
Index ¶
- func AllChecksPassed(checks []*github.CheckRun) bool
- func GetCheckRun(ctx context.Context, gh *github.Client, owner, repo string, checkRunID int64) (*github.CheckRun, error)
- func ListCheckRuns(ctx context.Context, gh *github.Client, owner, repo, ref string) ([]*github.CheckRun, error)
- func ListCheckRunsForPR(ctx context.Context, gh *github.Client, owner, repo string, prNumber int) ([]*github.CheckRun, error)
- func ListCheckSuites(ctx context.Context, gh *github.Client, owner, repo, ref string) ([]*github.CheckSuite, error)
- func WaitForChecks(ctx context.Context, gh *github.Client, owner, repo, ref string, ...) ([]*github.CheckRun, bool, error)
- type ChecksStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllChecksPassed ¶
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.
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.
Click to show internal directories.
Click to hide internal directories.