Skip to content

Commit 9fd41bf

Browse files
committed
updates
1 parent 30edc39 commit 9fd41bf

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

internal/exec/atlantis_generate_repo_config.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ func ExecuteAtlantisGenerateRepoConfigCmd(cmd *cobra.Command, args []string) err
106106
}
107107

108108
return ExecuteAtlantisGenerateRepoConfigAffectedOnly(
109-
&atmosConfig,
109+
atmosConfig,
110110
outputPath,
111111
configTemplateName,
112112
projectTemplateName,
@@ -122,7 +122,7 @@ func ExecuteAtlantisGenerateRepoConfigCmd(cmd *cobra.Command, args []string) err
122122
}
123123

124124
return ExecuteAtlantisGenerateRepoConfig(
125-
&atmosConfig,
125+
atmosConfig,
126126
outputPath,
127127
configTemplateName,
128128
projectTemplateName,
@@ -133,7 +133,7 @@ func ExecuteAtlantisGenerateRepoConfigCmd(cmd *cobra.Command, args []string) err
133133

134134
// ExecuteAtlantisGenerateRepoConfigAffectedOnly generates repository configuration for Atlantis only for the affected components and stacks
135135
func ExecuteAtlantisGenerateRepoConfigAffectedOnly(
136-
atmosConfig *schema.AtmosConfiguration,
136+
atmosConfig schema.AtmosConfiguration,
137137
outputPath string,
138138
configTemplateName string,
139139
projectTemplateName string,
@@ -155,7 +155,7 @@ func ExecuteAtlantisGenerateRepoConfigAffectedOnly(
155155

156156
if repoPath != "" {
157157
affected, _, _, _, err = ExecuteDescribeAffectedWithTargetRepoPath(
158-
atmosConfig,
158+
&atmosConfig,
159159
repoPath,
160160
verbose,
161161
false,
@@ -167,7 +167,7 @@ func ExecuteAtlantisGenerateRepoConfigAffectedOnly(
167167
)
168168
} else if cloneTargetRef {
169169
affected, _, _, _, err = ExecuteDescribeAffectedWithTargetRefClone(
170-
atmosConfig,
170+
&atmosConfig,
171171
ref,
172172
sha,
173173
sshKeyPath,
@@ -182,7 +182,7 @@ func ExecuteAtlantisGenerateRepoConfigAffectedOnly(
182182
)
183183
} else {
184184
affected, _, _, _, err = ExecuteDescribeAffectedWithTargetRefCheckout(
185-
atmosConfig,
185+
&atmosConfig,
186186
ref,
187187
sha,
188188
verbose,
@@ -229,14 +229,14 @@ func ExecuteAtlantisGenerateRepoConfigAffectedOnly(
229229

230230
// ExecuteAtlantisGenerateRepoConfig generates repository configuration for Atlantis
231231
func ExecuteAtlantisGenerateRepoConfig(
232-
atmosConfig *schema.AtmosConfiguration,
232+
atmosConfig schema.AtmosConfiguration,
233233
outputPath string,
234234
configTemplateNameArg string,
235235
projectTemplateNameArg string,
236236
stacks []string,
237237
components []string,
238238
) error {
239-
stacksMap, _, err := FindStacksMap(*atmosConfig, false)
239+
stacksMap, _, err := FindStacksMap(atmosConfig, false)
240240
if err != nil {
241241
return err
242242
}
@@ -356,7 +356,7 @@ func ExecuteAtlantisGenerateRepoConfig(
356356
context := cfg.GetContextFromVars(varsSection)
357357
context.Component = strings.Replace(componentName, "/", "-", -1)
358358
context.ComponentPath = terraformComponentPath
359-
contextPrefix, err := cfg.GetContextPrefix(stackConfigFileName, context, GetStackNamePattern(*atmosConfig), stackConfigFileName)
359+
contextPrefix, err := cfg.GetContextPrefix(stackConfigFileName, context, GetStackNamePattern(atmosConfig), stackConfigFileName)
360360
if err != nil {
361361
return err
362362
}
@@ -381,7 +381,7 @@ func ExecuteAtlantisGenerateRepoConfig(
381381
}
382382

383383
// Calculate terraform workspace
384-
workspace, err := BuildTerraformWorkspace(*atmosConfig, configAndStacksInfo)
384+
workspace, err := BuildTerraformWorkspace(atmosConfig, configAndStacksInfo)
385385
if err != nil {
386386
return err
387387
}
@@ -525,7 +525,7 @@ specified in the ` + "`" + `integrations.atlantis.config_templates` + "`" + ` se
525525
return err
526526
}
527527
} else {
528-
err = u.PrintAsYAML(atmosConfig, atlantisYaml)
528+
err = u.PrintAsYAML(&atmosConfig, atlantisYaml)
529529
if err != nil {
530530
return err
531531
}

pkg/atlantis/atlantis_generate_repo_config_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ func TestExecuteAtlantisGenerateRepoConfig(t *testing.T) {
4646
assert.Nil(t, err)
4747

4848
err = e.ExecuteAtlantisGenerateRepoConfig(
49-
&atmosConfig,
49+
atmosConfig,
5050
"/dev/stdout",
5151
"config-1",
5252
"project-1",
@@ -62,7 +62,7 @@ func TestExecuteAtlantisGenerateRepoConfig2(t *testing.T) {
6262
assert.Nil(t, err)
6363

6464
err = e.ExecuteAtlantisGenerateRepoConfig(
65-
&atmosConfig,
65+
atmosConfig,
6666
"/dev/stdout",
6767
"",
6868
"",
@@ -78,7 +78,7 @@ func TestExecuteAtlantisGenerateRepoConfigAffectedOnly(t *testing.T) {
7878
assert.Nil(t, err)
7979

8080
err = e.ExecuteAtlantisGenerateRepoConfigAffectedOnly(
81-
&atmosConfig,
81+
atmosConfig,
8282
"/dev/stdout",
8383
"",
8484
"",

0 commit comments

Comments
 (0)