-
Notifications
You must be signed in to change notification settings - Fork 53
#134 Add prompts for project names #156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| // @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) |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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? |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stray print command
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
No description provided.