Documentation
¶
Index ¶
- type AppInfo
- type AuthInfo
- type CICheckStatus
- type CIStatus
- type CheckCIStatus
- type CheckCIStatusForChecks
- type CheckOverallCIStatus
- type CheckPRMerged
- type CheckRun
- type CheckSuiteInfo
- type GHClient
- func AuthenticateWithApp(ctx context.Context, logger *slog.Logger, privateKey []byte, ...) (GHClient, error)
- func AuthenticateWithToken(ctx context.Context, logger *slog.Logger, token string, ...) GHClient
- func NewGithubClient(ctx context.Context, logger *slog.Logger, authInfo AuthInfo, ...) (GHClient, error)
- func (c GHClient) GetCIStatus(ctx context.Context, owner, repoName, ref string, excludes []string) (CIStatus, error)
- func (c GHClient) GetCIStatusForChecks(ctx context.Context, owner, repoName string, ref string, checkNames []string) (CIStatus, []string, error)
- func (c GHClient) GetDetailedCIStatus(ctx context.Context, owner, repoName, ref string) ([]CICheckStatus, error)
- func (c GHClient) GetPRHeadSHA(ctx context.Context, owner, repo string, prNumber int) (string, error)
- func (c GHClient) IsPRMergedOrClosed(ctx context.Context, owner, repo string, prNumber int) (string, bool, int64, error)
- type GetDetailedCIStatus
- type GetPRHeadSHA
- type PageInfo
- type RollupContextNode
- type RollupContexts
- type StatusCheckRollup
- type StatusContext
- type WorkflowInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CheckCIStatus ¶
type CheckCIStatus interface { CheckOverallCIStatus CheckCIStatusForChecks }
type CheckCIStatusForChecks ¶
type CheckOverallCIStatus ¶
type CheckPRMerged ¶
type CheckRun ¶
type CheckRun struct { Name string Status string Conclusion string CheckSuite CheckSuiteInfo }
type CheckSuiteInfo ¶
type CheckSuiteInfo struct { App AppInfo WorkflowRun struct { Workflow WorkflowInfo } }
type GHClient ¶
type GHClient struct {
// contains filtered or unexported fields
}
func AuthenticateWithApp ¶
func AuthenticateWithApp(ctx context.Context, logger *slog.Logger, privateKey []byte, appID, installationID int64, pendingRecheckTime time.Duration) (GHClient, error)
AuthenticateWithApp authenticates with a GitHub App
func AuthenticateWithToken ¶
func AuthenticateWithToken(ctx context.Context, logger *slog.Logger, token string, pendingRecheckTime time.Duration) GHClient
AuthenticateWithToken authenticates with a GitHub token.
func NewGithubClient ¶
func (GHClient) GetCIStatus ¶
func (GHClient) GetCIStatusForChecks ¶
func (c GHClient) GetCIStatusForChecks(ctx context.Context, owner, repoName string, ref string, checkNames []string) (CIStatus, []string, error)
GetCIStatusForCheck returns the CI status for a specific commit. It looks at both 'checks' and 'statuses'.
func (GHClient) GetDetailedCIStatus ¶
func (GHClient) GetPRHeadSHA ¶
type GetDetailedCIStatus ¶
type GetPRHeadSHA ¶
type RollupContextNode ¶
type RollupContextNode struct { Typename string `graphql:"__typename"` CheckRun CheckRun `graphql:"... on CheckRun"` StatusContext StatusContext `graphql:"... on StatusContext"` }
type RollupContexts ¶
type RollupContexts struct { CheckRunCount int StatusContextCount int Nodes []RollupContextNode PageInfo PageInfo }
type StatusCheckRollup ¶
type StatusCheckRollup struct { State string Contexts RollupContexts `graphql:"contexts(first: 100, after: $cursor)"` }
type StatusContext ¶
func (StatusContext) Outcome ¶
func (s StatusContext) Outcome() CIStatus
func (StatusContext) String ¶
func (s StatusContext) String() string
func (StatusContext) Type ¶
func (s StatusContext) Type() string
type WorkflowInfo ¶
type WorkflowInfo struct {
Name string
}
Click to show internal directories.
Click to hide internal directories.