Skip to content

upstream-sync-cli

The sync-upstreams command: reads its arguments, wires syncUpstreams to the real git, gh, GitHub API and npm registry, and turns the results into an exit code.

Function Description
createNodeSyncDependencies Creates the sync’s outside world: commands run with spawnSync, JSON fetched with fetch, output to stdout. GITHUB_TOKEN, when set, is sent to the GitHub API and nowhere else.
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).
runSyncUpstreamsCli Runs the sync-upstreams command.