async _promptingGitHub()

in generators/git-hub/index.js [36:68]


  async _promptingGitHub(answers) {
    this.props.withGitHub = ((answers.withGitHub || this.props.withGitHub) + '').toLowerCase() === 'true'
    const prompts = this.props.withGitHub
      ? [
        {
          type: "string",
          name: "gitHubOrg",
          message: "What GitHub organization do you want to push to?",
          default: await this.github.username,
          when: (answers) => !this.options.hasOwnProperty("gitHubOrg"),
        },
        {
          type: "string",
          name: "gitHubRepo",
          message: "What is the GitHub repository you want to push to?",
          default: () => this.props.solutionSlug,
          when: (answers) => !this.options.hasOwnProperty("gitHubRepo"),
        },
        {
          type: "confirm",
          name: "withGitHubPush",
          message:
            "Create the remote GitHub repository and push with GitHub CLI?",
          default: false,
          when: (answers) => !this.options.hasOwnProperty("withGitHubPush"),
        }
      ]
      : [];
      return this.prompt(prompts).then(answers => {
        this.parent.props = { ...this.props, ...answers };
        this.parent.props.gitHubRepoUrl = `https://github.com/${this.parent.props.gitHubOrg}/${this.parent.props.gitHubRepo}`;
      });
  };