TicketJson class

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.

gg do add writes it to <ticket folder>/ticket.json — inside the ticket workspace only, never into a repository, so it is never committed and never pushed. gg do checkout <path|url> reproduces the ticket 1:1 from it, which makes sharing a ticket an explicit act.

Constructors

TicketJson({required String issueId, required String description, required List<TicketRepo> repositories, String ggVersion = ''})
Constructor.
const
TicketJson.fromJsonString(String source)
Parses a TicketJson from a JSON string. Throws FormatException when the source is not a JSON object and Exception when the marker was written by a newer gg than ggCliVersion.
factory

Properties

description → String
The human-readable ticket description.
final
ggVersion → String
The version of the gg CLI that wrote the marker. Empty for markers written before gg started stamping its version.
final
hashCode → int
The hash code for this object.
no setterinherited
issueId → String
The ticket id (equals the ticket folder name and the branch name).
final
repositories → List<TicketRepo>
All repositories that belong to the ticket.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toPrettyJson() → String
Renders a pretty (multi-line) JSON string for good readability, ending with a trailing newline.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited