Skip to content

Conversation

@bmonkman
Copy link
Contributor

@bmonkman bmonkman commented Jun 9, 2020

No description provided.

@bmonkman bmonkman requested review from davidcheung and thdaraujo June 9, 2020 23:17
// @TODO : Uncomment when this struct is implemented
repoName := prompts[moduleName].GetParam(initParams)
repoURL := fmt.Sprintf("%s/%s", initParams["GithubRootOrg"], repoName)
//projectConfig.Modules[moduleName].Files.Directory = prompts[moduleName].GetParam(initParams)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll uncomment this after Thiago's PR is merged.

wg := sync.WaitGroup{}
wg.Add(len(moduleSources))
for _, moduleSource := range moduleSources {
go module.FetchModule(moduleSource, &wg)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fetching will be done in parallel now


for _, moduleSource := range moduleSources {
mod, err := module.FetchModule(moduleSource)
mod, err := module.ParseModuleConfig(moduleSource)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Split the parsing out from the fetching

Modules []string
Name string
ShouldPushRepositories bool
Infrastructure Infrastructure // TODO simplify and flatten / rename?
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Gonna remove this Infrastructure struct entirely in another PR

repoURL := fmt.Sprintf("%s/%s", initParams["GithubRootOrg"], repoName)
//projectConfig.Modules[moduleName].Files.Directory = prompts[moduleName].GetParam(initParams)
//projectConfig.Modules[moduleName].Files.Repository = repoURL
fmt.Println(repoURL)
Copy link
Contributor

Choose a reason for hiding this comment

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

stray print command

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, reminder that that code needs to be filled in.

type PromptHandler struct {
moduleconfig.Parameter
Condition func(map[string]string) bool
Validate func(string) error
Copy link
Contributor

@davidcheung davidcheung Jun 10, 2020

Choose a reason for hiding this comment

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

🎉 maybe later on we can implement some type of openapi schema validation, then user can supply that on the module side and we can consume from Parameter struct as well

@bmonkman bmonkman merged commit eb68ca4 into master Jun 10, 2020
@bmonkman bmonkman deleted the add-prompts-for-project-names branch June 10, 2020 04:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants