addReposBetweenWithAddCommand function

Future<List<String>> addReposBetweenWithAddCommand({
  1. required Directory ticketDir,
  2. required Set<String> releases,
  3. required GgLog ggLog,
})

The AddReposBetween gg do review is handed: adds the repos between releases and the ticket in ticketDir the way gg do add transitive for <releases> does — --no-fetch, like WorkspaceRepoHost.addWithAddCommand: an ocean repo on a feature branch, or a network hiccup, must not fail a review that has pushed already.

Implementation

Future<List<String>> addReposBetweenWithAddCommand({
  required Directory ticketDir,
  required Set<String> releases,
  required GgLog ggLog,
}) {
  final ticketPath = path.absolute(ticketDir.path);
  return AddCommand(
    ggLog: ggLog,
    executionPath: ticketPath,
    oceanWorkspacePath: WorkspaceUtils.defaultOceanWorkspacePath(
      workingDir: ticketPath,
    ),
  ).addReposBetween(ticketPath: ticketPath, releases: releases, fetch: false);
}