Skip to content

Commit

Permalink
fix the underlying issue
Browse files Browse the repository at this point in the history
  • Loading branch information
smonero committed Apr 14, 2024
1 parent 86843ad commit 9352a3f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"

"github.com/pkg/errors"
"github.com/runatlantis/atlantis/server/models"
"github.com/runatlantis/atlantis/server/neptune/adhoc/adhocgithubhelpers"
"github.com/runatlantis/atlantis/server/neptune/gateway/config"
root_config "github.com/runatlantis/atlantis/server/neptune/gateway/config"
Expand Down Expand Up @@ -33,7 +34,21 @@ func ConstructAdhocExecParamsWithRootCfgBuilderAndRepoRetriever(ctx context.Cont
},
}

rootCfgs, err := rootCfgBuilder.Build(ctx, &root_config.RepoCommit{}, repo.Credentials.InstallationToken, opts)
rootCfgs, err := rootCfgBuilder.Build(ctx, &root_config.RepoCommit{
Repo: models.Repo{
FullName: repo.GetFullName(),
Owner: repo.Owner,
Name: repoName,
CloneURL: repo.URL,
VCSHost: models.VCSHost{
Hostname: "github.com",
Type: models.Github,
},
DefaultBranch: repo.DefaultBranch,
},
Branch: repo.DefaultBranch,
Sha: revision,
}, repo.Credentials.InstallationToken, opts)
if err != nil {
return AdhocTerraformWorkflowExecutionParams{}, errors.Wrap(err, "building root cfgs")
}
Expand Down
3 changes: 0 additions & 3 deletions server/vcs/provider/github/repo_fetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,6 @@ func (g *RepoFetcher) Fetch(ctx context.Context, repo models.Repo, branch string
}

func (g *RepoFetcher) clone(ctx context.Context, repo models.Repo, branch string, sha string, options RepoFetcherOptions) (string, func(ctx context.Context, filePath string), error) {
// debug
options.SimplePath = false

destinationPath := g.generateDirPath(repo.Name)
// If simple path is enabled, we don't need a prefix and UUID
if options.SimplePath {
Expand Down

0 comments on commit 9352a3f

Please sign in to comment.