Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HasWorkflowDispatch ¶
HasWorkflowDispatch checks if workflow_dispatch is in the on: section.
func ParseAnnotations ¶
ParseAnnotations extracts cron annotations from workflow file content.
Types ¶
type ScanResult ¶
type ScanResult struct {
Annotations []github.CronAnnotation
Skipped []SkippedAnnotation
}
ScanResult holds the scan results.
type Scanner ¶
type Scanner struct {
// contains filtered or unexported fields
}
Scanner scans repositories for cron annotations.
type ScannerClient ¶
type ScannerClient interface {
GetInstallationRepos(ctx context.Context) ([]github.Repository, error)
GetWorkflowFiles(ctx context.Context, owner, repo string) ([]github.WorkflowFile, error)
GetFileContent(ctx context.Context, owner, repo, path, ref string) (string, error)
}
ScannerClient is the GitHub API interface used by the scanner.
type SkippedAnnotation ¶ added in v0.2.0
type SkippedAnnotation struct {
Owner string `json:"owner"`
Repo string `json:"repo"`
WorkflowFile string `json:"workflow_file"`
CronExpr string `json:"cron_expr"`
Reason string `json:"reason"`
}
SkippedAnnotation holds info about an annotation that failed validation.
Click to show internal directories.
Click to hide internal directories.