call method
Implementation
Future<String> call({
required String repo,
required int num,
required Iterable<Indicate> indicates,
}) async {
final commentKeyGroup = indicates.groupBy<_CommentKey>(
(indicate) => _CommentKey(
path: indicate.path,
line: indicate.line,
),
);
final comments = commentKeyGroup.entries.map((entry) {
final key = entry.key;
final value = entry.value;
final body = '''
<!-- $elixirKey -->
<table>
<tbody>
${value.map((e) => e.message).join('\n')}
</tbody>
</table>''';
return Comment(
path: key.path,
line: key.line,
body: body,
);
}).toList();
return _gitHubRepository.createReview(
repo: repo,
num: num,
comments: comments,
);
}