Skip to content
Open
Show file tree
Hide file tree
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
5 changes: 5 additions & 0 deletions changelog/v0.21.29/skip-ci-label-support.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
changelog:
- type: NEW_FEATURE
description: Allow skipping ci when label is added to changelog.
issueLink: https://github.com/solo-io/gloo-mesh-enterprise/issues/1127
resolvesIssue: false
10 changes: 10 additions & 0 deletions changelogutils/changelog.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,25 @@ type ChangelogEntry struct {
DependencyRepo string `json:"dependencyRepo,omitempty"`
DependencyTag string `json:"dependencyTag,omitempty"`
ResolvesIssue *bool `json:"resolvesIssue,omitempty"`
SkipCI *bool `json:"skipCI,omitempty"`
}

// default true
func (c *ChangelogEntry) GetResolvesIssue() bool {
if c.ResolvesIssue == nil {
return true
}
return *c.ResolvesIssue
}

// default false
func (c *ChangelogEntry) GetSkipCI() bool {
if c.SkipCI == nil {
return false
}
return *c.SkipCI
}

type ChangelogFile struct {
Entries []*ChangelogEntry `json:"changelog,omitempty"`
ReleaseStableApi *bool `json:"releaseStableApi,omitempty"`
Expand Down
6 changes: 5 additions & 1 deletion changelogutils/changelog_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,18 +76,22 @@ var _ = Describe("ChangelogTest", func() {
- type: FIX
description: foo
issueLink: bar
resolvesIssue: false`
resolvesIssue: false
skipCI: true`
err := yaml.Unmarshal([]byte(contents), &clf)
Expect(err).NotTo(HaveOccurred())
boolValue := new(bool)
*boolValue = false
skipCIValue := new(bool)
*skipCIValue = true
expected := changelogutils.ChangelogFile{
Entries: []*changelogutils.ChangelogEntry{
{
Type: changelogutils.FIX,
Description: "foo",
IssueLink: "bar",
ResolvesIssue: boolValue,
SkipCI: skipCIValue,
},
},
}
Expand Down