Skip to content

Commit

Permalink
ok
Browse files Browse the repository at this point in the history
  • Loading branch information
smonero committed Apr 9, 2024
1 parent 528d44a commit 3471764
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,7 @@ func ConstructAdhocExecParamsWithRootCfgBuilderAndRepoRetriever(ctx context.Cont
return AdhocTerraformWorkflowExecutionParams{}, errors.Wrap(err, "building root cfgs")
}

roots, err := getRootsFromMergedProjectCfgs(rootCfgs)
if err != nil {
return AdhocTerraformWorkflowExecutionParams{}, errors.Wrap(err, "getting roots from merged project cfgs")
}
roots := getRootsFromMergedProjectCfgs(rootCfgs)

return AdhocTerraformWorkflowExecutionParams{
Revision: revision,
Expand Down
4 changes: 2 additions & 2 deletions server/neptune/adhoc/adhocexecutionhelpers/root_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ import (
"github.com/runatlantis/atlantis/server/neptune/workflows/activities/terraform"
)

func getRootsFromMergedProjectCfgs(rootCfgs []*valid.MergedProjectCfg) ([]terraform.Root, error) {
func getRootsFromMergedProjectCfgs(rootCfgs []*valid.MergedProjectCfg) []terraform.Root {
roots := make([]terraform.Root, 0, len(rootCfgs))
for _, rootCfg := range rootCfgs {

Check failure on line 13 in server/neptune/adhoc/adhocexecutionhelpers/root_helpers.go

View workflow job for this annotation

GitHub Actions / runner / golangci-lint

unnecessary leading newline (whitespace)

root := convertMergedProjectCfgToRoot(rootCfg)
terraformRoot := convertToTerraformRoot(root)
roots = append(roots, terraformRoot)
}
return roots, nil
return roots
}

func convertMergedProjectCfgToRoot(rootCfg *valid.MergedProjectCfg) workflows.Root {
Expand Down

0 comments on commit 3471764

Please sign in to comment.