private cloneIfNeeded()

in lib/pull-request/pr.ts [339:353]


  private cloneIfNeeded(): string[] {

    return [
      // check if .git exist
      'ls .git ' +

      // all good
      '&& { echo ".git directory exists";  } ' +

      // clone if it doesn't
      `|| { echo ".git directory doesnot exist - cloning..." && git init . && git remote add origin git@github.com:${this.props.repo.owner}/${this.props.repo.repo}.git && git fetch && git reset --hard origin/${this.baseBranch} && git branch -M ${this.baseBranch} && git clean -fqdx; }`,

    ];

  }