Select and check downstream preflight targets
This commit is contained in:
@@ -79,3 +79,28 @@ func buildInspectionTargets(cfg *config.Config, sessionID string, trim bool, key
|
||||
}
|
||||
return targets, nil
|
||||
}
|
||||
|
||||
// executionDownstreamTargets selects checks only for projected work.
|
||||
func executionDownstreamTargets(cfg *config.Config, sessionID string, projection *workProjection) (preflight.Targets, error) {
|
||||
targets, err := executionInspectionTargets(cfg, sessionID, projection)
|
||||
if err != nil {
|
||||
return preflight.Targets{}, err
|
||||
}
|
||||
result := preflight.Targets{Scriptorium: targets}
|
||||
for _, item := range projection.Stages {
|
||||
if item.Name == "polish" && item.Decision.action == stageActionRun {
|
||||
result.Polish = true
|
||||
}
|
||||
}
|
||||
return result, nil
|
||||
}
|
||||
|
||||
// validationDownstreamTargets selects checks for enabled functionality regardless of reuse.
|
||||
func validationDownstreamTargets(cfg *config.Config, sessionID string) (preflight.Targets, error) {
|
||||
targets, err := validationInspectionTargets(cfg, sessionID)
|
||||
if err != nil {
|
||||
return preflight.Targets{}, err
|
||||
}
|
||||
// Polish is a canonical pipeline stage and has no enable/disable setting.
|
||||
return preflight.Targets{Polish: true, Scriptorium: targets}, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user