We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Bad state: No element
1 parent e14472f commit 4543c38Copy full SHA for 4543c38
pkgs/sdk_triage_bot/lib/triage.dart
@@ -51,15 +51,16 @@ Future<void> triage(
51
String? lastComment;
52
if (issue.hasComments) {
53
final comments = await githubService.fetchIssueComments(sdkSlug, issue);
54
- final comment = comments.last;
55
-
56
- lastComment = '''
+ final comment = comments.lastOrNull;
+ if (comment != null) {
+ lastComment = '''
57
---
58
59
Here is the last comment on the issue (by user @${comment.user?.login}):
60
61
${trimmedBody(comment.body ?? '')}
62
''';
63
+ }
64
}
65
66
// decide if we should triage
0 commit comments