seedComment method

FakeComment seedComment(
  1. String slug,
  2. int number,
  3. String body, {
  4. String? author,
})

Appends a comment directly — the fixture path for a comment written in the GitHub UI rather than by the code under test.

Implementation

FakeComment seedComment(String slug, int number, String body,
    {String? author}) {
  final at = _now;
  final comment = FakeComment(
    id: _nextCommentId++,
    body: body,
    author: author ?? actor,
    createdAt: at,
    updatedAt: at,
  );
  repo(slug).issues[number]!.comments.add(comment);
  return comment;
}