-
Notifications
You must be signed in to change notification settings - Fork 356
Expand file tree
/
Copy pathcompile_config.go
More file actions
69 lines (64 loc) · 4.28 KB
/
compile_config.go
File metadata and controls
69 lines (64 loc) · 4.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
package cli
// CompileConfig holds configuration options for compiling workflows
type CompileConfig struct {
MarkdownFiles []string // Files to compile (empty for all files)
Verbose bool // Enable verbose output
EngineOverride string // Override AI engine setting
Validate bool // Enable schema validation
Watch bool // Enable watch mode
WorkflowDir string // Custom workflow directory
SkipInstructions bool // Deprecated: Instructions are no longer written during compilation
NoEmit bool // Validate without generating lock files
Purge bool // Remove orphaned lock files
TrialMode bool // Enable trial mode (suppress safe outputs)
TrialLogicalRepoSlug string // Target repository for trial mode
Strict bool // Enable strict mode validation
Dependabot bool // Generate Dependabot manifests for npm dependencies
ForceOverwrite bool // Force overwrite of existing files (dependabot.yml)
RefreshStopTime bool // Force regeneration of stop-after times instead of preserving existing ones
ForceRefreshActionPins bool // Force refresh of action pins by clearing cache and resolving from GitHub API
AllowActionRefs bool // Allow unresolved action refs as warnings instead of errors
Zizmor bool // Run zizmor security scanner on generated .lock.yml files
Poutine bool // Run poutine security scanner on generated .lock.yml files
Actionlint bool // Run actionlint linter on generated .lock.yml files
RunnerGuard bool // Run runner-guard taint analysis scanner on generated .lock.yml files
JSONOutput bool // Output validation results as JSON
ActionMode string // Action script inlining mode: inline, dev, or release
ActionTag string // Override action SHA or tag for actions/setup (overrides action-mode to release)
ActionsRepo string // Override the external actions repository (default: github/gh-aw-actions)
Stats bool // Display statistics table sorted by file size
FailFast bool // Stop at first error instead of collecting all errors
ScheduleSeed string // Override repository slug used for fuzzy schedule scattering (e.g. owner/repo)
Approve bool // Approve all safe update changes, skipping safe update enforcement regardless of strict mode setting.
ValidateImages bool // Require Docker to be available for container image validation (fail instead of skipping when Docker is unavailable)
PriorManifestFile string // Path to a JSON file containing pre-cached manifests (map[lockFile]*GHAWManifest) collected at MCP server startup; takes precedence over git HEAD / filesystem reads for safe update enforcement
}
// WorkflowFailure represents a failed workflow with its error count
type WorkflowFailure struct {
Path string // File path of the workflow
ErrorCount int // Number of errors in this workflow
ErrorMessages []string // Actual error messages to display to the user
}
// CompilationStats tracks the results of workflow compilation
type CompilationStats struct {
Total int
Errors int
Warnings int
FailedWorkflows []string // Names of workflows that failed compilation (deprecated, use FailedWorkflowDetails)
FailureDetails []WorkflowFailure // Detailed information about failed workflows
}
// CompileValidationError represents a single validation error or warning
type CompileValidationError struct {
Type string `json:"type"`
Message string `json:"message"`
Line int `json:"line,omitempty"`
}
// ValidationResult represents the validation result for a single workflow
type ValidationResult struct {
Workflow string `json:"workflow"`
Valid bool `json:"valid"`
Errors []CompileValidationError `json:"errors"`
Warnings []CompileValidationError `json:"warnings"`
CompiledFile string `json:"compiled_file,omitempty"`
Labels []string `json:"labels,omitempty"` // Labels referenced in safe-outputs configurations
}