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
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,23 @@ func (m *HydrateKubernetes) BuildHelmRepositoriesFile(

var hRepo HelmRepo

// Set OCI disabled by default
ociEnabled := false
if envYamlStruct.Oci != nil {

ociEnabled = *envYamlStruct.Oci

}
Comment on lines +69 to +75
Copy link

Copilot AI Jan 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The OCI enabled logic can be simplified. Since the field is a pointer to bool with a default of false, you can simplify this by using a single expression that dereferences the pointer if non-nil, otherwise defaults to false. This reduces the need for an intermediate variable and makes the code more concise.

Copilot uses AI. Check for mistakes.

if envYamlStruct.Registry != "" {

hRepo = HelmRepo{

Name: repositoryName,

Url: envYamlStruct.Registry,

Oci: ociEnabled,
}

helmRepos = append(helmRepos, hRepo)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ func (m *HydrateKubernetes) RenderSysService(

if m.RepositoriesFile == nil {


reposFile, err := m.BuildHelmRepositoriesFile(
ctx,
m.DotFirestartrDir,
Expand Down
1 change: 1 addition & 0 deletions hydrate-orchestrator/modules/hydrate-kubernetes/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,5 @@ type EnvYaml struct {
Filename string `yaml:"filename"`
URL string `yaml:"url"`
} `yaml:"remoteArtifacts,omitempty"`
Oci *bool `yaml:"oci,omitempty"`
}
Loading