Skip to content

Commit

Permalink
Merge pull request #3508 from saschagrunert/release-notes-maps-exclusion
Browse files Browse the repository at this point in the history
Fix panic when the `--maps-from` value is smaller than 5 characters
  • Loading branch information
k8s-ci-robot authored Mar 13, 2024
2 parents 18f8bb3 + 6ef5504 commit 9d09f87
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/notes/document/document.go
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ func New(
}

if note.DoNotPublish {
logrus.Debugf("skipping PR %d as (marked to not be published)", pr)
logrus.Debugf("Skipping PR %d as (marked to not be published)", pr)
continue
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/notes/notes.go
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ func GatherReleaseNotes(opts *options.Options) (*ReleaseNotes, error) {
if err != nil {
return nil, fmt.Errorf("listing release notes: %w", err)
}
logrus.Infof("finished gathering release notes in %v", time.Since(startTime))
logrus.Infof("Finished gathering release notes in %v", time.Since(startTime))

return releaseNotes, nil
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/notes/notes_map.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ type MapProvider interface {
// NewProviderFromInitString creates a new map provider from an initialization string
func NewProviderFromInitString(initString string) (MapProvider, error) {
// If init string starts with gs:// return a CloudStorageProvider
if initString[0:5] == object.GcsPrefix {
if len(initString) >= 5 && initString[0:5] == object.GcsPrefix {
// Currently for illustration purposes
return nil, errors.New("CloudStorageProvider is not yet implemented")
}
Expand Down

0 comments on commit 9d09f87

Please sign in to comment.