gg_multi library

Classes

AddCommand
Command to add a repo or all repos of an organization to ocean+ticket. In ticket mode it also auto-clones transitive deps and re-localizes refs. Use --force to overwrite an existing repo in the ocean. --organization may be given multiple times to add all repos of several organization folders of the ocean at once. --no-localize copies the repos without rewriting their references to local paths. --no-transitive copies only the requested repos and leaves the repos between them in the dependency graph out of the ticket; ~/.gg_rc ({"do": {"add": {"transitive": false}}}, see GgRc) makes that the default. gg do add transitive for <repo>… adds them afterwards — only the repos above <repo>, which its breaking release strands (see ReposBetween); gg do add transitive without for asks about every ticket repo.
AzureDevOpsPlatform
Azure DevOps implementation of GitPlatform.
CanCommitCommand
Command to check if all repos in the ticket can be committed.
CanPublishCommand
Command to check if all repos in the ticket can be published.
CanPushCommand
Command to check if all repos in the ticket can be pushed.
CanReviewCommand
Command to check if all repos in the ticket can be reviewed.
CodeCommand
Command to open all repos (or a single repo) under a ticket in VS Code.
CreateCommand
Command to create resources such as tickets.
DidCommitCommand
Command to check if all repos in the ticket were committed.
DidPushCommand
Command to check if all repos in the ticket were pushed.
DidReviewCommand
Command to check whether the current ticket state was reviewed.
DoCheckoutCommand
Reproduces a whole ticket from a ticket.json.
DoClaudeCommand
Creates a ticket-level CLAUDE.md file from all repositories in a ticket.
DoCommitCommand
Command to commit changes across all repositories in the current ticket.
DoConfigurePublishCommand
Interactively builds the .gg/gg-publish.json publish configuration for the current ticket, asking for the version increment and merge message of every repo that needs a release.
DoExecuteCommand
Command that executes a shell command in all repositories of the current ticket in the order of the processing list.
DoLocalizeCommand
Localizes the references between the repositories of the current ticket: only out-of-sync repos are touched, gg's changes become #gg: commits. Repos missing between the ticket repos only warn with a gg do add hint.
DoMaintain
gg do maintain: runs maintenance tasks in all ocean repos.
DoPublishCommand
Command to publish all repos in the ticket.
DoPushCommand
Command to push changes across all repositories in the current ticket.
DoReviewCommand
Command to review all repos in the ticket.
DuplicateRepoCleanup
Moves the folders a repository rename left behind out of a workspace.
EnsureInRegistry
Makes sure at least one version of a repo's package is available on its registry (pub.dev for Dart/Flutter, npm for TypeScript) before the repo is published.
ExecCommand
Command that groups the things gg can execute across the ticket repos.
GgMulti
The command line interface for GgMulti
GgRc
The user's own gg settings: ~/.gg_rc, one JSON object.
GitHandler
Typedef for a process runner function. A class responsible for cloning git repositories and performing Git/utility operations.
GitHubPlatform
GitHub implementation of GitPlatform.
GitPlatform
Interface for Git platforms like GitHub, Azure DevOps, GitLab.
GraphCommand
Writes the dependency graph of the current workspace to stdout.
GraphEdge
One directed edge of the dependency graph.
GraphNode
One node of the dependency graph.
ImportCommand
Command that groups the things gg can import into the workspace.
InaccessibleDependency
A dependency that is neither in the ocean nor a third-party package, and that no organization lists — most likely a private repository the account cannot see.
InitCommand
Command that groups the things gg can initialize.
InitWorkspaceCommand
Command to initialize the ocean
ListCommand
Command to list items from the ocean. If no subcommand is provided, it asks the user to choose.
ListDepsCommand
Command to list dependencies of a project from the ocean.
ListOrganizationsCommand
Command to list all organizations from repos in the ocean.
ListReposCommand
Command to list all repositories in the ocean.
ListTicketsCommand
Command to list all tickets and their descriptions.
MissingOceanRepo
A dependency the ocean lacks although a known organization offers it.
MissingOceanRepos
Finds the repositories the ticket depends on that a known organization offers but the ocean does not hold.
MissingOceanReposReport
What MissingOceanRepos.find found.
MockCanCommitCommand
Mock for CanCommitCommand
MockCanPublishCommand
Mock for CanPublishCommand
MockCanPushCommand
Mock for CanPushCommand
MockCanReviewCommand
Mock for CanReviewCommand
MockDidCommitCommand
Mock for DidCommitCommand
MockDidPushCommand
Mock for DidPushCommand
MockDidReviewCommand
Mock for DidReviewCommand
MockDoClaudeCommand
Mock for DoClaudeCommand
MockDoCommitCommand
Mock for DoCommitCommand
MockDoConfigurePublishCommand
Mock for DoConfigurePublishCommand
MockDoLocalizeCommand
Mock for DoLocalizeCommand.
MockDoPublishCommand
Mock for DoPublishCommand
MockDoPushCommand
Mock for DoPushCommand
MockDoReviewCommand
Mock for DoReviewCommand
MockEnsureInRegistry
Mock for EnsureInRegistry
MockGraphCommand
Mock for GraphCommand
MockPublishPlanner
Mock for PublishPlanner
MockPublishSkipCheck
Mock for PublishSkipCheck
MockRepoFreshness
Mocktail mock
MockReposBetween
Mock for ReposBetween.
MockTicketLocalizer
Mocktail mock
MockTicketState
Mocktail mock for TicketState.
MockUpgradeDepsCommand
Mock for UpgradeDepsCommand
NpmRegistryChecker
The npm counterpart of PubDevChecker: checks whether published versions are visible on npm, backed by gg_lang's RegistryWaiter over an NpmRegistry (npm view <name> version).
Organization
Represents an organization with id, name, url, and an optional project name.
OrganizationRepo
A repository of a known organization that a manifest depends on.
OrganizationRepoLists
The repositories the registered organizations currently offer, asked for once per organization and run.
OrganizationUtils
A utility class to manage organizations associated with the ocean. Caches entries in a buffer.
PackagePublishInfo
Describes how a package is published.
ParseResult
Result of URL parsing.
PubDevChecker
Checks whether published versions are visible on pub.dev, backed by gg_lang's RegistryWaiter over a PubDevRegistry.
PublishPlan
The outcome of PublishPlanner.plan.
PublishPlanEntry
What a publish run will do with one repository of a ticket.
PublishPlanner
Decides what a ticket's publish run does with each of its repositories, and collects the answers the run needs — in one pass, in dependency order.
PublishPlanWording
The user-facing wording of a planning pass.
PublishSkipCheck
Decides whether a ticket repository needs to be published at all.
PublishSkipDecision
The outcome of PublishSkipCheck.get for one ticket repository.
RemoveRepoCommand
Deletes repositories from the ticket the command is invoked in.
RemoveTicketCommand
Closes one or more tickets: deletes the remote feature branches of their repositories and moves each whole ticket — repositories as they are, plus ticket.json, .gg/ and the .code-workspace file — to <root>/.trash/<ticket>.
RepoBaseline
What a ticket repo looked like before gg localized it.
RepoCommand
gg do create repo: creates a repository in the ocean of the workspace and, inside a ticket, adds it to the ticket. Outside of a workspace it creates the repository in the folder given with --output.
RepoFolderResolver
Resolves repository folders in a workspace. A folder is matched by its exact name, then by its manifest package name (for cross-language bridge repos whose folder name differs from the package name), then by its git remote url.
RepoFreshness
Brings a repository to the state of the remote branch it tracks.
RepoIdentity
What a checkout says it is, independent of the folder it lies in.
RepoInfo
A class holding repository information.
RepoPublishPlan
The answers PublishPlanner.configureRepo collected for one repository, plus the registry baseline its increment preview was based on.
ReposBetween
Finds the ocean repos a ticket lacks between its repos.
Repository
Represents a repository entry provided by a Git platform.
RmCommand
Command group for removing things from the workspace: rm repo <name…> deletes repositories from the current ticket — never from the master workspace — rm ticket closes the current ticket by moving it to the trash.
TicketCommand
Command to create a ticket folder and save ticket data as JSON.
TicketJson
The content of a ticket.json: the ticket id, its description and the full list of repositories (with git URLs) that make up the ticket.
TicketLocalizer
Keeps the references between the repositories of a ticket localized.
TicketRefsStatus
What keeps the references of a ticket from pointing at its checkouts.
TicketRepo
One repository entry of a TicketJson marker.
TicketState
Stores and retrieves cached success state of ticket-level commands.
Trash
The trash workspace <root>/.trash, the sibling of .ocean and of the ticket folders that holds everything gg removed from a ticket.
UpdateOceanCommand
Brings the ocean in sync with the git platforms.
UpgradeDepsCommand
Command to upgrade the dependencies of all repos in the current ticket.
UrlParser
Unified URL parser for different git platforms.
VSCodeLauncher
Provides logic to open a directory or workspace file in VS Code via the command line.
WorkspaceRepoHost
Places a new repository into the ocean and, inside a ticket, adds it.
WorkspaceUtils
Utility functions that deal with the location of workspaces on disk.

Enums

InaccessibleReason
Why a dependency counts as one gg cannot see.
RepoBlocker
Why a repository was not brought to the state of its remote main branch.

Constants

claudeClaudeMd → const String
Begin of generated CLAUDE.md
claudeCodeStandards → const String
code standards to be included in generated CLAUDE.md
claudeCommands → const String
command instructions to be included in generated CLAUDE.md
claudeHooksFolder → const String
The folder below .claude/ holding the scripts the hooks run.
claudeMdEndMarker → const String
Marker that closes the managed CLAUDE.md block helix writes.
claudeMdStartMarker → const String
Marker that opens the managed CLAUDE.md block helix writes.
claudeSettingsFile → const String
The Claude Code settings file below .claude/.
codeWorkspaceLaunch → const Map<String, Object?>
The launch configurations every ticket workspace carries.
codeWorkspaceSettings → const Map<String, Object?>
The settings every ticket workspace carries.
colorOff → const String
SGR sequence switching the terminal back to its default colors.
dnaVersionStampPath → const String
Where instantiateWorkspaceDna notes the workspaceDnaLayer version it placed, relative to the folder it placed it in.
ggMultiLegacyMasterFolder → const String
The former name of ggMultiOceanFolder; auto-renamed at the next start
ggMultiLegacyTicketFolder → const String
The folder tickets used to be stored in.
ggMultiOceanFolder → const String
The ocean folder holding the pristine clones of all repos
ggMultiTrashFolder → const String
The trash folder beside .ocean that holds removed tickets and repos
gitattributesCommonLines → const String
The lines gg and the ticket workflow require in every repository's .gitattributes file, no matter which language it is written in.
gitattributesLockFilesByManifest → const Map<String, List<String>>
The lock files that are kept from the current branch instead of being merged textually, mapped to the manifest that makes them relevant.
legacyPrePushMarker → const String
Marker that identifies a pre-push hook as one gg installed itself.
legacyTicketJsonRelativePaths → const List<String>
Legacy locations of the ticket marker inside a repository.
pubspecOverridesFileName → const String
The file gg_localize_refs writes the local path overrides to.
ticketJsonFileName → const String
Name of the ticket description file inside the ticket folder.
workspaceDnaLayer → const String
The DNA layer every workspace and every ticket gets: the gg workflow guides, the skills and the managed CLAUDE.md block.

Properties

ggCliVersion ↔ String
The version of the gg CLI that stamps and checks .ticket.json markers.
getter/setter pair
oceanMigrationLog ↔ GgLog
The log sink migrateMasterFolderToOcean uses when no GgLog is passed.
getter/setter pair

Functions

addReposBetweenWithAddCommand({required Directory ticketDir, required Set<String> releases, required GgLog ggLog}) → Future<List<String>>
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.
addRepositoryHelper({required String targetArg, required GgLog ggLog, required GitHandler gitCloner, GitHubPlatform? gitHubPlatform, AzureDevOpsPlatform? azureDevOpsPlatform, required String workspacePath, bool force = false, bool logIfAlreadyAdded = true, Future<void> onRepoAdded(String repoName)?, SelectOrganization? selectOrganization, String? failureHint, OrganizationRepoLists? repoLists}) → Future<void>
Helper function to add a repository given a target argument. It supports various formats like URLs, SSH links, and plain names. For organization URLs, it fetches all repositories and clones them.
anyRepoHasAnswers({required Iterable<Directory> repoDirs, required Directory ticketDir}) → bool
Whether any repository of the ticket has publish answers recorded.
anyRepoHasStatus({required Iterable<Directory> repoDirs, required Directory ticketDir}) → bool
Whether any repository of the ticket carries the given status.
azureCloneUrl(Uri uri, ParseResult parsed) → String?
The clone url of the Azure DevOps repository parsed names, rebuilt from its parts in the form Azure serves: https://dev.azure.com/<org>/<project>/_git/<repo> or, on the legacy host, https://<org>.visualstudio.com/<project>/_git/<repo>.
azureSshBase(String baseUrl) → String?
baseUrl as an Azure DevOps SSH base, git@ssh.dev.azure.com:v3/…/, or null when it does not point at the Azure SSH host.
brokenGraphReport(String error) → List<String>
The report about an ocean dependency graph that does not build.
buildTicketJson({required Directory ticketDir, required Iterable<Directory> repoDirs}) → TicketJson
Builds a TicketJson for the ticket at ticketDir from repoDirs.
claudeLayerFilesIn(String dir) → List<String>
The .claude/CLAUDE_<layer>.md files in dir, sorted — one per DNA layer that ships a CLAUDE.md, imported by the managed block.
claudeMdBlock(String content) → String?
The managed block of a CLAUDE.md content, markers included — null when it holds no complete one.
claudeMdBlockIn(String dir) → String?
The managed block of the CLAUDE.md in dir, null without one.
cleanUpTicket({required Directory ticketDir, required List<Directory> repoDirs, required bool deleteRemoteBranch, required GgLog ggLog, required GgLog taskLog, ProcessRunner? processRunner, GitRetry gitRetry = const GitRetry()}) → Future<void>
Closes a finished ticket: deletes the remote feature branches, then moves the whole ticket folder into <root>/.trash/<ticket>.
cloneFailedReport({required String repoName, required String url, required String dependency, required String manifestPath, required String error}) → List<String>
The report about repoName, which gg do add could not clone from url because of error; dependency in manifestPath needs it.
copyDirectory(Directory source, Directory destination, {Set<String> skipNames = const {'node_modules', 'publish_config.json', 'publish_state.json', 'create_repo_state.json', 'gg-publish.json', '.gg-publish.json', '.ticket.json', 'ticket.json', '.gg_localize_refs_publish_to_backup.json'}}) → Future<void>
Recursively copies source to destination.
copyWorkspaceDna({required String root, required String ticketDir}) → Future<void>
Copies the gg DNA of the workspace root into ticketDir: the managed block of its CLAUDE.md — only the block, the user's own text around it stays in the root — together with the .claude/CLAUDE_<layer>.md files it imports, and everything in its .claude/skills/, the user's own skills included: which ones the DNA placed is not recorded. The same holds for the scripts in .claude/hooks/ and the .claude/settings.json that runs them: Claude Code reads the settings of the folder it starts in only, so a session in the ticket needs its own. A root without DNA leaves the ticket without it.
defaultReadManifestVersion(Directory repoDir) → Future<String?>
The default ReadManifestVersion — asks gg_lang for whichever manifest the repository carries. Returns null when there is none, or none with a version.
defaultSelectOrganization(String repoName, List<Organization> organizations) → Future<Organization?>
Asks the user which organization a repository should be taken from.
editMessage(String initialMessage, {required String prompt, required String subject, required String hint}) → Future<String?>
Opens the interactive message editor with initialMessage and returns what the user leaves in the buffer.
ensureLockFilesNotIgnored({required Directory repoDir, required GgLog ggLog}) → bool
Ensures .gitignore of repoDir does not exclude any of the lock files lockFileNamesFor reports for it. Returns true when the file was changed.
existingCheckoutOf({required String workspacePath, required Directory clone}) → Directory?
The checkout workspacePath already holds of the repository just cloned into clone, or null when clone is the only one.
extractRepoName(String repoUrl) → String?
Extracts the repository name from a git URL supporting:
fetchDependencyRepoUrl(String packageName, {ProjectType type = gg.ProjectType.dart, Future<Response> packageFetcher(Uri)?}) → Future<String?>
Fetches the repository URL for a dependency from its registry: pub.dev for Dart/Flutter, the npm registry for TypeScript. Returns the URL if found, otherwise null.
getAllRepoInfos(String oceanWorkspacePath) → Future<List<RepoInfo>>
Returns list of repository information for repos in oceanWorkspacePath.
getPubspecFromWorkspace({required String targetArg, required String workspacePath, required GgLog ggLog}) → Pubspec?
Retrieves the Pubspec for a repository in the ocean. Returns null if pubspec.yaml is not found or parsing fails.
getRepoInfo(String repoPath) → Future<RepoInfo>
Returns repository information for the repository at repoPath.
gitattributesRequiredLinesFor(String repoPath) → List<String>
The lines .gitattributes of the repository at repoPath must contain.
graphPackageDirs({required String oceanPath, required String? ticketPath}) → ({List<Directory> dirs, Set<String> ticketNames})
The repo folders a workspace dependency graph is built from: the repos of ticketPath first, then every repo of oceanPath no ticket repo of the same folder name shadows. ticketNames are the ticket repos' folder names.
inaccessibleDependencyReport(InaccessibleDependency dependency) → List<String>
The report about dependency, which gg cannot see.
installGitattributes({required Directory directory, required GgLog ggLog, SortedProcessingList? sortedProcessingList, ProcessRunner? processRunner}) → Future<void>
Ensures a .gitattributes file containing all lines gitattributesRequiredLinesFor returns for the repository exists in every repository of the ticket directory lies in, and that the merge=ours driver is configured locally.
installRepoDependencies({required Directory dir, required String repoName, required GgLog ggLog, required ProcessRunner processRunner, bool upgradeDart = false, GgLog? errorLog}) → Future<void>
Installs the dependencies of every package manager the repo dir uses; upgradeDart runs pub upgrade, through flutter in a Flutter repo. Failures are logged to errorLog (default ggLog), never thrown.
instantiateWorkspaceDna({required String root, required RunDna runDna, required GgLog ggLog, Directory createTemp()?}) → Future<void>
Places workspaceDnaLayer into the workspace root — the folder holding the ocean. The same three steps as by hand: gg dna init, gg dna add dna_gg --workspace and gg dna build --workspace. add resolves the latest dna_gg, so every call starts from the current guides and skills. --workspace instantiates only .claude/ and the managed CLAUDE.md block — a workspace is no package of its own, so it never gets doc/, scripts/, .github/ or a DNA manifest. add builds right after installing the layer (the same instantiation build performs), so it needs the flag as much as the explicit build call that follows it.
isAzureWebHost(String host) → bool
Whether host is one of the hosts Azure DevOps serves its web and clone URLs from: dev.azure.com or the legacy <org>.visualstudio.com.
isFormerNameCheckoutOf(Directory dir, String repoName) → bool
Whether dir is a checkout of repoName under a former name: its manifests declare repoName, while its folder and its remote still name another repository of the same organization.
latestWorkspaceDnaVersion({Future<Response> fetcher(Uri)?}) → Future<String?>
Asks pub.dev for the latest published version of workspaceDnaLayer. null when pub.dev cannot be reached or answers with anything else — the caller then instantiates instead of guessing.
legacyTicketPublishConfigFile(Directory ticketDir) → File
The legacy ticket-level publish configuration of ticketDir — <ticket>/.gg/gg-publish.json, or the even older <ticket>/.gg-publish.json when only that one exists.
loadTicketPublishState(Directory ticketDir) → PublishState
The ticket-wide run state of ticketDir — currently the delete-the-ticket answer, which belongs to no single repository.
loadTicketRepoPublishFiles({required Directory repoDir, required Directory ticketDir}) → RepoPublishFiles
Reads the publish files of repoDir, falling back to what the ticket in ticketDir recorded before the per-repo split.
lockFileNamesFor(String repoPath) → List<String>
The lock file names that must be committable in the repository at repoPath — one entry per language the repository actually uses.
matchOceanRepoNames(String target, Iterable<String> oceanRepoNames) → List<String>
The names in oceanRepoNames that target selects when read as a regular expression, sorted so a run is reproducible.
mergeClaudeSettings({required String? existing, required String dna, required Set<String> dnaHookScripts}) → String
The Claude Code settings existing with the DNA settings dna merged in. The keys of existing win, except for hooks: per event, the hook groups of existing that run one of the dnaHookScripts — what an earlier DNA placed — are replaced by the groups of dna; the user's own groups stay. Without existing, it is dna. An existing that is no JSON object is left as it is.
migrateMasterFolderToOcean({required String rootPath, GgLog? ggLog}) → bool
Renames the legacy <root>/.master folder to <root>/.ocean and an existing <root>/.trash/.master to <root>/.trash/.ocean.
migrateTicketToFlatFolders({required String ticketPath, required GgLog ggLog}) → List<String>
Moves every repository of the ticket ticketPath out of its organization folder up into the ticket itself (<ticket>/<repo>).
migrateToOrgFolders({required String workspacePath, required GgLog ggLog}) → List<String>
Moves every repository that still sits directly in workspacePath into a folder named after the organization of its git remote (<workspace>/<org>/<repo>).
missingBetweenReport(List<String> names, {required Iterable<String> breaking}) → List<String>
The report about names, ocean repos the ticket lacks between its repos and the breaking ones, whose release breaks its dependents.
missingFromOceanReport(List<MissingOceanRepo> repos, String workspaceRoot) → List<String>
The report about repos, which the ticket depends on but the ocean lacks; workspaceRoot is where gg do add clones into the ocean only.
organizationsOwningRepo({required String repoName, required String workspacePath, required GitHandler gitCloner, OrganizationRepoLists? repoLists}) → Future<List<Organization>>
Returns the known organizations of workspacePath that own a repository named repoName, in the order they are registered.
plainError(Object error) → String
error as one line a report can show: without the Exception: prefix, without colors and with its lines joined.
pubDevPackageExists(String package, {Future<Response> get(Uri url) = http.get}) → Future<bool?>
Asks the pub.dev API whether it hosts package; null when it does not answer within five seconds or answers with anything but 200 or 404. get replaces the request in tests.
readTicketDescription(Directory ticketDir) → String?
Reads the trimmed description from <ticketDir>/ticket.json, or returns null when the file is missing, is not a JSON object, is malformed, or carries an empty description.
readTicketJson(Directory ticketDir) → TicketJson?
Reads <ticketDir>/ticket.json, or returns null when the file is missing or malformed.
recordedBreakingRepos({required Iterable<Directory> repoDirs, required Directory ticketDir, ReadManifestVersion readManifestVersion = defaultReadManifestVersion}) → Future<Set<String>>
The folder names of the repoDirs whose recorded release breaks its dependents (releaseBreaks): the increment gg do review stored in the repository's publish_config.json, applied to the version its manifest declares.
refreshWorkspaceDna({required String root, required RunDna runDna, required GgLog ggLog, required Future<String?> latestVersion()}) → Future<void>
Brings the gg DNA of the workspace root to the latest workspaceDnaLayer. The cheap path first: one look at pub.dev (latestVersion), and a root that holds its managed CLAUDE.md block is left as it is when its stamp names that version — or when pub.dev cannot be asked: helix needs pub.dev as well, so offline the DNA that is there is the best there is. Only a new release or a root without its DNA pays for the instantiation.
releaseBreaks(VersionIncrement? increment, {required Version? base, required Directory repoDir}) → bool
Whether releasing repoDir with increment on top of base breaks its dependents: the new version leaves the caret range of base — the range a dependent's ^ constraint was written for, and the one PublishSkipCheck judges it by.
removeDependencyOverrides({required Iterable<Directory> repoDirs, required Set<String> packageNames}) → List<Directory>
Removes packageNames from the localized overrides of every repo in repoDirs — the dependency_overrides of pubspec_overrides.yaml (Dart) and the overrides of pnpm-workspace.yaml (pnpm-managed TypeScript) — and returns the directories whose files were changed.
removeLegacyGitHooks({required Directory repoDir, required GgLog ggLog}) → bool
Removes the obsolete gg-generated pre-push hook from repoDir.
repoHasPublishStepProgress(Directory repoDir) → bool
Whether repoDir's own .gg/publish_state.json records completed publish steps — i.e. gg do publish already did irreversible work in that repo.
repoUrlOfOrganization(Organization org, String repoName) → String
Returns the clone url of repoName within org.
runWithLimit<T>(Iterable<T> items, int maxParallel, Future<void> task(T item)) → Future<void>
Processes items with task, running up to maxParallel tasks at a time. Tasks run in submission order; the first failure is rethrown after all already-started tasks have settled.
sshUrlOf(String url) → String
url in its ssh form when it names a GitHub or Azure DevOps repository over https, else unchanged: gg clones both hosts always over ssh — a password prompt there cannot succeed once the organization enforces 2FA, which Azure DevOps commonly does.
staleOceanReport(String error) → List<String>
The report about ocean repos that could not be brought to their remote state because of error — their outdated manifests may report repos as between that are not any more.
uncheckedOrganizationReport(Organization org, String reason) → List<String>
The report about org, whose repositories could not be listed because of reason.
upsertClaudeMdBlock(String content, String block) → String
content of a CLAUDE.md with its managed block replaced by block — or block appended after a blank line when it has none yet, the way helix places it. Throws a StateError when a start marker has no end marker after it: appending would leave the file with two blocks.
writeCodeWorkspaceFile(Directory ticketDir, List<String> repoPaths) → void
Writes the VS Code .code-workspace file for ticketDir with one folder entry per repository in repoPaths (deduplicated, insertion order kept).
writeTicketJson(Directory ticketDir, TicketJson ticket) → void
Writes (overwriting) ticket to <ticketDir>/ticket.json.

Typedefs

AddReposBetween = Future<List<String>> Function({required GgLog ggLog, required Set<String> releases, required Directory ticketDir})
Adds to the ticket in ticketDir the ocean repos between its repos and the releases — what gg do add transitive for <releases> does — and returns the folder names it added, sorted.
AddToTicket = Future<void> Function({required GgLog ggLog, required String oceanPath, required String ticketPath, required String url})
Adds the repository cloned from url to the ticket at ticketPath.
BranchSelector = Future<String?> Function(List<String> branches)
Lets the user pick one branch from branches; returns null on cancel.
CopyDirectory = Future<void> Function(Directory src, Directory dest)
Copies a directory tree; injectable for tests.
DirectoryFactory = Directory Function(String path)
Typedef for creating Directory instances (for testing).
EditMessage = Future<String?> Function(String initialMessage)
Typedef for editing a commit or merge message interactively.
FetchRepoUrl = Future<String?> Function(String packageName)
Resolves the repository URL of a hosted dependency. Subset of fetchDependencyRepoUrl without named args, for test stubs.
ProcessStarter = Future<void> Function(String executable, List<String> arguments, {bool runInShell})
Typedef for launching a process, mainly for testability.
PubDevPackageExists = Future<bool?> Function(String package)
Answers whether pub.dev hosts package: true or false, null when pub.dev could not be asked.
ReadLineFromStdIn = String? Function()
Typedef for reading one line from stdin (for injection & tests).
ReadManifestVersion = Future<String?> Function(Directory repoDir)
Reads the version repoDir currently declares in its manifest, or null when it declares none.
ReadSettings = GgRc Function({required GgLog ggLog})
Reads the user's settings — GgRc.load fits.
SelectOrganization = Future<Organization?> Function(String repoName, List<Organization> organizations)
Lets the user pick the organization a repository named repoName should be taken from. Returns null when the selection was cancelled.
TicketJsonFetcher = Future<String> Function(Uri url)
Downloads the ticket.json at url; injectable for tests.

Exceptions / Errors

MergeConflictException
Thrown when merging the default branch into a feature branch ends in conflicts.
RepoFreshnessException
Thrown when repositories could not be brought to their remote state.
SshSetupException
Thrown when a clone failed because ssh is not set up for the host yet: the host is unknown, its key changed or it refused the user's key.