Skip to content

Commit

Permalink
Merge pull request #3509 from saschagrunert/maps
Browse files Browse the repository at this point in the history
Do not exclude mapped notes
  • Loading branch information
k8s-ci-robot committed Mar 13, 2024
2 parents 9d09f87 + 19f2eca commit d7b7bf3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/notes/document/document.go
Expand Up @@ -306,7 +306,7 @@ func New(
doc.CVEList = append(doc.CVEList, newcve)
}

if note.DoNotPublish {
if !note.IsMapped && note.DoNotPublish {
logrus.Debugf("Skipping PR %d as (marked to not be published)", pr)
continue
}
Expand Down
5 changes: 5 additions & 0 deletions pkg/notes/notes.go
Expand Up @@ -136,6 +136,9 @@ type ReleaseNote struct {

// DataFields a key indexed map of data fields
DataFields map[string]ReleaseNotesDataField `json:"-"`

// IsMapped is set if the note got modified from a map
IsMapped bool `json:"is_mapped,omitempty"`
}

type Documentation struct {
Expand Down Expand Up @@ -1146,6 +1149,8 @@ func (rn *ReleaseNote) ApplyMap(noteMap *ReleaseNotesMap, markdownLinks bool) er
logrus.WithFields(logrus.Fields{
"pr": rn.PrNumber,
}).Debugf("Applying map to note")
rn.IsMapped = true

reRenderMarkdown := false
if noteMap.ReleaseNote.Author != nil {
rn.Author = *noteMap.ReleaseNote.Author
Expand Down

0 comments on commit d7b7bf3

Please sign in to comment.