final public function getCLIArguments()

in src/importit/phase/ImportItSyncPhase.php [52:120]


  final public function getCLIArguments(
  ): vec<\Facebook\ShipIt\ShipItCLIArgument> {
    return vec[
      shape(
        'long_name' => 'expected-head-revision::',
        'description' => 'The expected revision at the HEAD of the PR',
        'write' => $x ==> {
          $this->expectedHeadRev = $x;
          return $this->expectedHeadRev;
        },
      ),
      shape(
        'long_name' => 'pull-request-number::',
        'description' => 'The number of the Pull Request to import',
        'write' => $x ==> {
          $this->pullRequestNumber = $x;
          return $this->pullRequestNumber;
        },
      ),
      shape(
        'long_name' => 'save-patches-to::',
        'description' =>
          'Directory to copy created patches to. Useful for '.'debugging',
        'write' => $x ==> {
          $this->patchesDirectory = $x;
          return $this->patchesDirectory;
        },
      ),
      shape(
        'long_name' => 'skip-pull-request',
        'description' => 'Dont fetch a PR, instead just use the local '.
          'expected-head-revision',
        'write' => $_ ==> {
          $this->skipPullRequest = true;
          return $this->skipPullRequest;
        },
      ),
      shape(
        'long_name' => 'apply-to-latest',
        'description' => 'Apply the PR patch to the latest internal revision, '.
          'instead of on the internal commit that matches the '.
          'PR base. Mutually exclusive with apply-to-target',
        'write' => $_ ==> {
          $this->applyToLatest = true;
          $this->assertApplyToMutualExclusivity();
          return $this->applyToLatest;
        },
      ),
      shape(
        'long_name' => 'apply-to-target::',
        'description' => 'Apply the PR patch to the given target revision, '.
          'instead of on the internal commit that matches the '.
          'PR base. Mutually exclusive with apply-to-latest',
        'write' => $x ==> {
          $this->applyToTarget = $x;
          $this->assertApplyToMutualExclusivity();
          return $this->applyToTarget;
        },
      ),
      shape(
        'long_name' => 'skip-submodules',
        'description' => 'Don\'t sync submodules',
        'write' => $_ ==> {
          $this->shouldDoSubmodules = false;
          return $this->shouldDoSubmodules;
        },
      ),
    ];
  }