Integrate selected builds with candidate workflows

This commit is contained in:
2026-10-05 19:38:50 +00:00
parent 5d6a6d10bd
commit e98ee0f7b9
21 changed files with 848 additions and 31 deletions

View File

@@ -30,6 +30,7 @@ type Request struct {
Product string
Version string
Validate func(context.Context, Candidate) error
AfterValidate func(context.Context, Candidate) error
Output io.Writer
}
@@ -41,6 +42,11 @@ func Check(ctx context.Context, request Request) (Candidate, error) {
if err := Validate(ctx, request, captured); err != nil {
return Candidate{}, err
}
if request.AfterValidate != nil {
if err := request.AfterValidate(ctx, captured); err != nil {
return Candidate{}, fmt.Errorf("after candidate validation: %w", err)
}
}
if err := Recheck(ctx, captured, ""); err != nil {
return Candidate{}, err
}