Documentation
¶
Overview ¶
Package app contains the application-level orchestration for ci-snitch.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct {
Repo string
Branch string
Since time.Time
Workflow string
IncludeFailures bool
Verbose bool
}
Options configures an analysis run.
type RunStore ¶
type RunStore interface {
RunsSince(workflowID int64, since time.Time) ([]model.WorkflowRun, error)
IncompleteRunIDs() ([]int64, error)
LoadRunDetail(runID int64) (*model.RunDetail, error)
SaveRunDetails(details []model.RunDetail) error
}
RunStore abstracts the SQLite store.
type Service ¶
type Service struct {
Client WorkflowFetcher
Store RunStore // nil to skip caching
Prog *output.Progress
}
Service orchestrates the fetch → preprocess → analyze pipeline.
type WorkflowFetcher ¶
type WorkflowFetcher interface {
ListWorkflows(ctx context.Context) ([]model.Workflow, error)
FetchRuns(ctx context.Context, workflowID int64, since time.Time, branch string) ([]model.WorkflowRun, []diag.Diagnostic, error)
FetchRunDetails(ctx context.Context, runs []model.WorkflowRun) ([]model.RunDetail, []diag.Diagnostic)
FetchRunDetailsGraphQL(ctx context.Context, runs []model.WorkflowRun) ([]model.RunDetail, []diag.Diagnostic)
RateLimit(ctx context.Context) (github.RateLimitStatus, error)
}
WorkflowFetcher abstracts the GitHub API client.
Click to show internal directories.
Click to hide internal directories.