Skip to content
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

Feature/554 auto generate markets and marketlist upon mcdev init + fixes #590 bug around git user names/emails #591

Conversation

JoernBerkefeld
Copy link
Contributor

@JoernBerkefeld JoernBerkefeld commented Dec 8, 2022

PR details

What is the purpose of this pull request?

What changes did you make? (Give an overview)

when mcdev init is executed it now auto-populates markets and marketList in the config with actual values based on the retrieved list of BUs. We ask the user which BU is the development BU to properly fill deployment-source vs deployment-target lists. Also, we exclude ParentBU in these market lists.
image

Is there anything you'd like reviewers to focus on?

  1. I decided to auto-fill created markets with ONE variable already, suffix, and so far, the value we fill is "underscore + buName". That's a placeholder.
  2. Alternatively, we could have no market variables in the markets or an empty suffix parameter, or we could even ask the user for a list of parameters (comma separated) to refill each market with that list of (empty) parameters.
  3. In a CI/CD environment with skipInteraction enabled, one can pass in the name via --y.developmentBu=myBuName or leave it empty, which shows a warning and pushes all BUs (except parent) into the target list.
  4. If mcdev init is re-run, e.g. to add a 2nd credential, this code is NOT executed. It really only runs upon the initial execution

Checklist

  • I have performed a self-review of my own code
  • ran npm run test to with 0 tests failing
  • I have commented my code, particularly in hard-to-understand areas
  • ESLint & Prettier are not outputting errors or warnings

@JoernBerkefeld JoernBerkefeld added the enhancement New feature or request; requires increasing the minor version of mcdev. Jira issue-type "Story" label Dec 8, 2022
@JoernBerkefeld JoernBerkefeld added this to the 4.2.0 milestone Dec 8, 2022
@JoernBerkefeld JoernBerkefeld self-assigned this Dec 8, 2022
if (hideOutput) {
// no output displayed to user but instead returned to parsed elsewhere
return child_process
.execSync(cmd + ' ' + args.join(' '))

Check warning

Code scanning / CodeQL

Unsafe shell command constructed from library input

This string concatenation which depends on [library input](1) is later used in a [shell command](2).
} else {
// the following options ensure the user sees the same output and
// interaction options as if the command was manually run
child_process.execSync(cmd + ' ' + args.join(' '), { stdio: [0, 1, 2] });

Check warning

Code scanning / CodeQL

Unsafe shell command constructed from library input

This string concatenation which depends on [library input](1) is later used in a [shell command](2).
@JoernBerkefeld JoernBerkefeld linked an issue Dec 8, 2022 that may be closed by this pull request
5 tasks
@JoernBerkefeld JoernBerkefeld changed the title Feature/554 auto generate markets and marketlist upon mcdev init Feature/554 auto generate markets and marketlist upon mcdev init + #590 chore Dec 8, 2022
@JoernBerkefeld JoernBerkefeld linked an issue Dec 8, 2022 that may be closed by this pull request
2 tasks
@JoernBerkefeld JoernBerkefeld changed the title Feature/554 auto generate markets and marketlist upon mcdev init + #590 chore Feature/554 auto generate markets and marketlist upon mcdev init + fixes #590 bug around git user names/emails Dec 8, 2022
@JoernBerkefeld JoernBerkefeld added the bug Something isn't working label Dec 8, 2022
@DougMidgley DougMidgley merged commit e1af95e into develop Dec 8, 2022
@DougMidgley DougMidgley deleted the feature/554-auto-generate-markets-and-marketlist-upon-mcdev-init branch December 8, 2022 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request; requires increasing the minor version of mcdev. Jira issue-type "Story"
Projects
Status: Done
2 participants