Validate derived candidate tags before checks

This commit is contained in:
2026-11-01 21:13:54 +00:00
parent abbab3c8ce
commit b91a0d1914
8 changed files with 54 additions and 14 deletions

View File

@@ -105,6 +105,9 @@ func Capture(ctx context.Context, request Request) (Candidate, error) {
if err := validateNote(note, request.Product, request.Version); err != nil {
return captured, fmt.Errorf("release note %q: %w", identity.NotePath, err)
}
if err := git.CheckTagRef(ctx, repositoryDir, identity.Tag); err != nil {
return captured, fmt.Errorf("validate local candidate tag: %w", err)
}
if exists, err := hasLocalTag(ctx, repositoryDir, identity.Tag); err != nil {
return captured, fmt.Errorf("inspect local tag %q: %w", identity.Tag, err)
} else if exists {