Documentation ¶
Index ¶
- func FindAppInstallID(ctx context.Context, lister InstallationLister, owner string) (int64, error)
- func ListWorkflowJobs(ctx context.Context, lister WorkflowJobLister, owner, repo string, runID int64) ([]*github.WorkflowJob, error)
- func ListWorkflowRuns(ctx context.Context, actions WorkflowRuns, owner, repo, path, branch string, ...) ([]*github.WorkflowRun, error)
- func WaitForRun(ctx context.Context, actions WorkflowRuns, owner, repo, path string, ...) (string, error)
- type GitHub
- type InstallationLister
- type RunIDSet
- type WorkflowJobLister
- type WorkflowRuns
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindAppInstallID ¶
FindAppInstallID finds the ID of an app installation on a given GitHub account. The App ID is inferred by the credentials used by the `lister` to authenticate with the GitHub API
func ListWorkflowJobs ¶
func ListWorkflowJobs(ctx context.Context, lister WorkflowJobLister, owner, repo string, runID int64) ([]*github.WorkflowJob, error)
ListWorkflowJobs lists the jobs for a given workflow run in the specified repository.
func ListWorkflowRuns ¶
func ListWorkflowRuns(ctx context.Context, actions WorkflowRuns, owner, repo, path, branch string, since time.Time) ([]*github.WorkflowRun, error)
Returns information about all matched runs started after `since`.
func WaitForRun ¶
func WaitForRun(ctx context.Context, actions WorkflowRuns, owner, repo, path string, runID int64) (string, error)
WaitForRun blocks until the specified workflow run completes, and returns the overall workflow status.
Types ¶
type GitHub ¶
type GitHub interface {
ListReleases(ctx context.Context, organization, repository string) ([]github.RepositoryRelease, error)
}
GitHub is a minimal GitHub client for ease of use
type InstallationLister ¶
type InstallationLister interface {
ListInstallations(ctx context.Context, opts *github.ListOptions) ([]*github.Installation, *github.Response, error)
}
InstallationLister defines the minimal interface for listing GitHub App Installations via the GitHub API.
type RunIDSet ¶
type RunIDSet map[int64]struct{}
func ListWorkflowRunIDs ¶
func ListWorkflowRunIDs(ctx context.Context, actions WorkflowRuns, owner, repo, path, branch string, since time.Time) (RunIDSet, error)
ListWorkflowRunIDs returns a set of RunIDs, representing the set of all for workflow runs created since the supplied start time.
type WorkflowJobLister ¶
type WorkflowJobLister interface {
ListWorkflowJobs(ctx context.Context, owner, repo string, runID int64, opts *github.ListWorkflowJobsOptions) (*github.Jobs, *github.Response, error)
}
WorkflowJobLister defines the minimal GitHub client interafce required to list query and compose workflow jobs.
type WorkflowRuns ¶
type WorkflowRuns interface { GetWorkflowRunByID(ctx context.Context, owner, repo string, runID int64) (*github.WorkflowRun, *github.Response, error) ListWorkflowRunsByFileName(ctx context.Context, owner, repo, workflowFileName string, opts *github.ListWorkflowRunsOptions) (*github.WorkflowRuns, *github.Response, error) }
WorkflowRuns defines the minimal API used to lst and query GitHub action runner workflows and jobs