gg_multi_core
library
Classes
AzureDevOpsPlatform
Azure DevOps implementation of GitPlatform.
GitHubPlatform
GitHub implementation of GitPlatform.
GitPlatform
Interface for Git platforms like GitHub, Azure DevOps, GitLab.
MockPublishPlanner
Mock for PublishPlanner
MockPublishSkipCheck
Mock for PublishSkipCheck
MockTicketState
Mocktail mock for TicketState .
Organization
Represents an organization with id, name, url, and an optional project name.
OrganizationUtils
A utility class to manage organizations
associated with the ocean. Caches entries in a buffer.
ParseResult
Result of URL parsing.
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.
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.
RepoPublishPlan
The answers PublishPlanner.configureRepo collected for one repository,
plus the registry baseline its increment preview was based on.
Repository
Represents a repository entry provided by a Git platform.
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.
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.
UrlParser
Unified URL parser for different git platforms.
WorkspaceUtils
Utility functions that deal with the location of workspaces on disk.
Functions
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.
buildTicketJson ({required Directory ticketDir , required Iterable <Directory > repoDirs })
→ TicketJson
Builds a TicketJson for the ticket at ticketDir from repoDirs.
cleanUpTicket ({required Directory ticketDir , required List <Directory > repoDirs , required bool deleteRemoteBranch , required GgLog ggLog , required GgLog taskLog , ProcessRunner? processRunner })
→ Future <void >
Closes a finished ticket: deletes the remote feature branches, then
moves the whole ticket folder into <root>/.trash/<ticket>.
copyDirectory (Directory source , Directory destination , {Set <String > skipNames = const {'node_modules', 'publish_config.json', 'publish_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.
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.
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.
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.
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>).
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.
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.
writeTicketJson (Directory ticketDir , TicketJson ticket )
→ void
Writes (overwriting) ticket to <ticketDir>/ticket.json.