Skip to content

Commit

Permalink
Do not print empty OpenShift customConfigs in configs (#426)
Browse files Browse the repository at this point in the history
  • Loading branch information
creydr authored Nov 18, 2024
1 parent 343ac51 commit e85941f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pkg/prowgen/prowgen_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,11 @@ type OpenShift struct {
UseClusterPool bool `json:"useClusterPool,omitempty" yaml:"useClusterPool,omitempty"`
Cron string `json:"cron,omitempty" yaml:"cron,omitempty"`
// SkipCron ensures that no periodic jobs are generated for tests running on the given OpenShift version.
SkipCron bool `json:"skipCron,omitempty" yaml:"skipCron,omitempty"`
CronForceKonfluxIndex bool `json:"cronForceKonfluxIndex,omitempty" yaml:"cronForceKonfluxIndex,omitempty"`
OnDemand bool `json:"onDemand,omitempty" yaml:"onDemand,omitempty"`
CustomConfigs CustomConfigsEnablement `json:"customConfigs,omitempty" yaml:"customConfigs,omitempty"`
CandidateRelease bool `json:"candidateRelease,omitempty" yaml:"candidateRelease,omitempty"`
SkipCron bool `json:"skipCron,omitempty" yaml:"skipCron,omitempty"`
CronForceKonfluxIndex bool `json:"cronForceKonfluxIndex,omitempty" yaml:"cronForceKonfluxIndex,omitempty"`
OnDemand bool `json:"onDemand,omitempty" yaml:"onDemand,omitempty"`
CustomConfigs *CustomConfigsEnablement `json:"customConfigs,omitempty" yaml:"customConfigs,omitempty"`
CandidateRelease bool `json:"candidateRelease,omitempty" yaml:"candidateRelease,omitempty"`
}

type CustomConfigsEnablement struct {
Expand Down Expand Up @@ -283,7 +283,7 @@ func NewGenerateConfigs(ctx context.Context, r Repository, cc CommonConfig, opts
Branch: branchName,
})

if !ov.CustomConfigs.Enabled {
if ov.CustomConfigs == nil || !ov.CustomConfigs.Enabled {
continue
}

Expand Down

0 comments on commit e85941f

Please sign in to comment.