Skip to content

Commit 29ebe1c

Browse files
committed
Also verify that Maintainers are valid in individual entry objects
1 parent 8bde624 commit 29ebe1c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

manifest/rfc2822.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,9 @@ func (manifest *Manifest2822) AddEntry(entry Manifest2822Entry) error {
167167
if !GitCommitRegex.MatchString(entry.GitCommit) {
168168
return fmt.Errorf(`Tags %q has invalid GitCommit (must be a commit, not a tag or ref): %q`, entry.TagsString(), entry.GitCommit)
169169
}
170+
if invalidMaintainers := entry.InvalidMaintainers(); len(invalidMaintainers) > 0 {
171+
return fmt.Errorf("Tags %q has invalid Maintainers: %q (expected format %q)", strings.Join(invalidMaintainers, ", "), MaintainersFormat)
172+
}
170173

171174
for _, tag := range entry.Tags {
172175
if otherEntry := manifest.GetTag(tag); otherEntry != nil {

0 commit comments

Comments
 (0)