Skip to content

Commit

Permalink
[GithubIssueBridge] Fix bridge after DOM changes
Browse files Browse the repository at this point in the history
  • Loading branch information
logmanoriginal committed Jun 9, 2019
1 parent ea08445 commit ba116d9
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions bridges/GithubIssueBridge.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ba116d9

Please sign in to comment.