seedIssue method
Creates an issue directly — the fixture path, and the way a test plays the part of a human who opened the issue in the GitHub UI.
Implementation
FakeIssue seedIssue(
String slug, {
required String title,
String body = '',
Set<String> labels = const {},
String state = 'open',
}) {
final r = repo(slug);
final number = r.nextIssueNumber++;
final at = _now;
final issue = FakeIssue(
number: number,
nodeId: 'I_${slug}_$number',
title: title,
body: body,
author: actor,
createdAt: at,
updatedAt: at,
state: state,
labels: {...labels},
);
r.labels.addAll(labels);
r.issues[number] = issue;
return issue;
}