Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.23changelogutils: more logs #546

Open
wants to merge 1 commit into
base: v0.23.x
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions changelogutils/reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"github.com/ghodss/yaml"
"github.com/pkg/errors"
"github.com/rotisserie/eris"
"github.com/solo-io/go-utils/contextutils"
"github.com/solo-io/go-utils/versionutils"
"github.com/solo-io/go-utils/vfsutils"
)
Expand Down Expand Up @@ -131,25 +132,31 @@ func (c *changelogReader) ReadChangelogFile(ctx context.Context, path string) (*
}

for _, entry := range changelog.Entries {
var err error
if entry.Type != NON_USER_FACING && entry.Type != DEPENDENCY_BUMP {
if entry.IssueLink == "" {
return nil, MissingIssueLinkError
err = MissingIssueLinkError
}
if entry.Description == "" {
return nil, MissingDescriptionError
err = MissingDescriptionError
}
}
if entry.Type == DEPENDENCY_BUMP {
if entry.DependencyOwner == "" {
return nil, MissingOwnerError
err = MissingOwnerError
}
if entry.DependencyRepo == "" {
return nil, MissingRepoError
err = MissingRepoError
}
if entry.DependencyTag == "" {
return nil, MissingTagError
err = MissingTagError
}
}
if err != nil {
contextutils.LoggerFrom(ctx).Errorf("Changelog entry %v is invalid: %v", entry, err)
contextutils.LoggerFrom(ctx).Errorf("Overall entries: %v", changelog.Entries)
return nil, err
}
}

return &changelog, nil
Expand Down
Loading