writeTicketJson function
Writes (overwriting) ticket to <ticketDir>/ticket.json.
The file lives in the ticket workspace, next to the repositories and not inside any of them, so git never sees it and the ticket description cannot reach a remote.
Implementation
void writeTicketJson(Directory ticketDir, TicketJson ticket) {
if (!ticketDir.existsSync()) {
ticketDir.createSync(recursive: true);
}
File(
path.join(ticketDir.path, ticketJsonFileName),
).writeAsStringSync(ticket.toPrettyJson());
}