Skip to content

Commit 0072754

Browse files
gcp-cherry-pick-bot[bot]eddycharlydependabot[bot]
authored
fix: default report name not set correctly (#1939) (#1940)
* chore(deps): bump zgosalvez/github-actions-ensure-sha-pinned-actions (#1936) Bumps [zgosalvez/github-actions-ensure-sha-pinned-actions](https://github.com/zgosalvez/github-actions-ensure-sha-pinned-actions) from 3.0.11 to 3.0.12. - [Release notes](https://github.com/zgosalvez/github-actions-ensure-sha-pinned-actions/releases) - [Commits](zgosalvez/github-actions-ensure-sha-pinned-actions@3c16e89...0901cf7) --- updated-dependencies: - dependency-name: zgosalvez/github-actions-ensure-sha-pinned-actions dependency-type: direct:production update-type: version-update:semver-patch ... * fix: default report name not set correctly --------- Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: Charles-Edouard Brétéché <[email protected]> Co-authored-by: Charles-Edouard Brétéché <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 parent 2c80661 commit 0072754

File tree

2 files changed

+16
-5
lines changed

2 files changed

+16
-5
lines changed

.release-notes/main.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@ Release notes for `TODO`.
1313
1414
## ⛵ Tutorials ⛵
1515
16-
## 🔧 Fixes 🔧
17-
1816
## 📚 Docs 📚
1917
2018
## 🎸 Misc 🎸
2119
-->
20+
21+
## 🔧 Fixes 🔧
22+
23+
- Fixed default report name not set correctly

pkg/commands/test/command.go

+12-3
Original file line numberDiff line numberDiff line change
@@ -138,19 +138,28 @@ func Command() *cobra.Command {
138138
}
139139
if flagutils.IsSet(flags, "report-format") {
140140
if configuration.Spec.Report == nil {
141-
configuration.Spec.Report = &v1alpha2.ReportOptions{}
141+
configuration.Spec.Report = &v1alpha2.ReportOptions{
142+
Format: v1alpha2.JSONFormat,
143+
Name: "chainsaw-report",
144+
}
142145
}
143146
configuration.Spec.Report.Format = v1alpha2.ReportFormatType(options.reportFormat)
144147
}
145148
if flagutils.IsSet(flags, "report-path") {
146149
if configuration.Spec.Report == nil {
147-
configuration.Spec.Report = &v1alpha2.ReportOptions{}
150+
configuration.Spec.Report = &v1alpha2.ReportOptions{
151+
Format: v1alpha2.JSONFormat,
152+
Name: "chainsaw-report",
153+
}
148154
}
149155
configuration.Spec.Report.Path = options.reportPath
150156
}
151157
if flagutils.IsSet(flags, "report-name") {
152158
if configuration.Spec.Report == nil {
153-
configuration.Spec.Report = &v1alpha2.ReportOptions{}
159+
configuration.Spec.Report = &v1alpha2.ReportOptions{
160+
Format: v1alpha2.JSONFormat,
161+
Name: "chainsaw-report",
162+
}
154163
}
155164
configuration.Spec.Report.Name = options.reportName
156165
}

0 commit comments

Comments
 (0)