Skip to content

parseSyncUpstreamsArguments

Builds the sync options from the command line.

--dry-run prints each PR it would open and changes nothing. --only=<name>[,<name>] limits the sync to those entries, --base=<branch> names the branch the PRs target (main by default), and --config=<path> names the upstreams.json (the one in the working directory by default).

Import:

import { parseSyncUpstreamsArguments } from '@mnaoumov/typescript-dev-toolkit/upstream-sync-cli';

Signature:

function parseSyncUpstreamsArguments(cliArguments: readonly string[]): SyncUpstreamsOptions

Parameters:

Parameter Type Description
cliArguments readonly string[] The arguments after the command name.

Returns: SyncUpstreamsOptions — The options.