Future symbolizeGiven()

in github-label-notifier/symbolizer/lib/bot.dart [237:280]


  Future<void> symbolizeGiven(
      RepositorySlug repo,
      Issue issue,
      User commandUser,
      Map<int, _Comment> worklist,
      SymbolizationOverrides overrides) async {
    _log.info('Symbolizing ${worklist.keys} with overrides {$overrides}');

    // Symbolize all collected comments.
    final symbolized = <int, SymbolizationResult>{};
    for (var comment in worklist.values) {
      final result =
          await symbolizer.symbolize(comment.body, overrides: overrides);
      if (result is SymbolizationResultError ||
          (result is SymbolizationResultOk && result.results.isNotEmpty)) {
        symbolized[comment.id] = result;
      }
    }

    if (symbolized.isEmpty) {
      await github.issues.createComment(repo, issue.number, '''
@${commandUser.login} No crash reports found. I used the following overrides
when looking for reports

```
$overrides
```

Note that I can only find native Android and iOS crash reports automatically,
you need to explicitly point me to crash reports in other supported formats.

If the crash report is embedded into a log and prefixed with additional
information I might not be able to automatically strip those prefixes.
Currently I only support `flutter run -v`, `adb logcat` and device lab logs.

See [my documentation](https://github.com/flutter-symbolizer-bot/flutter-symbolizer-bot/blob/main/README.md#commands) for more details on how to do that.
''');
      return;
    }

    // Post a comment containing all successfully symbolized crashes.
    await postResultComment(repo, issue, worklist, symbolized);
    await mailFailures(repo, issue, worklist, symbolized);
  }