From ba116d9ab603e8fc369fe4c47f5cc0ebb52ac44f Mon Sep 17 00:00:00 2001 From: logmanoriginal Date: Sun, 9 Jun 2019 19:57:48 +0200 Subject: [PATCH] [GithubIssueBridge] Fix bridge after DOM changes --- bridges/GithubIssueBridge.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/bridges/GithubIssueBridge.php b/bridges/GithubIssueBridge.php index 91dd45ec12d..9889083fe82 100644 --- a/bridges/GithubIssueBridge.php +++ b/bridges/GithubIssueBridge.php @@ -192,8 +192,13 @@ public function collectData(){ ENT_QUOTES, 'UTF-8' ); - $comments = trim($issue->find('.col-5', 0)->plaintext); - $item['content'] .= "\n" . 'Comments: ' . ($comments ? $comments : '0'); + + $comment_count = 0; + if($span = $issue->find('a[aria-label*="comment"] span', 0)) { + $comment_count = $span->plaintext; + } + + $item['content'] .= "\n" . 'Comments: ' . $comment_count; $item['uri'] = self::URI . $issue->find('.js-navigation-open', 0)->getAttribute('href'); $this->items[] = $item;