Documentation
¶
Overview ¶
Package validation provides input validation and history-based suggestions for workflow inputs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateDispatch ¶ added in v1.10.0
func ValidateDispatch(inputs map[string]workflow.Input, values map[string]string) map[string][]string
ValidateDispatch names what is wrong with a set of input values before the dispatch goes out, keyed by input name. A choice outside its options and a boolean that is not true or false are what GitHub rejects; a required input left blank is this tool's own rule, since a blank one is a mistake far more often than it is a value.
func ValidateEnvironment ¶ added in v1.10.0
ValidateEnvironment names an environment input set to something the repository does not have. It is separate because the environments are read from the API rather than declared by the workflow, and an empty list means they could not be read rather than that none exist.
Types ¶
type ConfigValidationError ¶
type ConfigValidationError struct {
HistoricalName string
HistoricalValue string
Suggestion string
Status Status
}
ConfigValidationError represents a validation error for a historical input.
func ValidateHistoryConfig ¶
func ValidateHistoryConfig(entry *frecency.HistoryEntry, wf *workflow.File) []ConfigValidationError
ValidateHistoryConfig validates a historical configuration against current workflow inputs. Returns a list of validation errors, or nil if all inputs are valid.