[GithubIssueBridge] Fix notice with reviews (#2589)

Some timeline items, like review threads and the first comment on PRs,
have no header, so this handles the first comment and adds a generic
title if that doesn't work.
This commit is contained in:
Yaman Qalieh 2022-04-01 10:38:07 -04:00 committed by GitHub
parent d6695c0e73
commit 8aa091beda
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -128,9 +128,8 @@ class GithubIssueBridge extends BridgeAbstract {
$author = $comment->find('.author', 0)->plaintext;
$title .= ' / ' . trim(
$comment->find('.timeline-comment-header-text', 0)->plaintext
);
$header = $comment->find('.timeline-comment-header > h3', 0);
$title .= ' / ' . ($header ? $header->plaintext : 'Activity');
$time = $comment->find('relative-time', 0);
if ($time === null) {