From 134c1d8b1ee959999af9ed198ec3b19905c502c1 Mon Sep 17 00:00:00 2001 From: Carmen Alvarez Date: Sat, 22 Aug 2015 05:56:08 +0200 Subject: [PATCH] Issue #5: correction for determining which review comments are obsolete. --- gm_pr/prfetcher.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gm_pr/prfetcher.py b/gm_pr/prfetcher.py index 1c1d0be..b944ecf 100644 --- a/gm_pr/prfetcher.py +++ b/gm_pr/prfetcher.py @@ -126,8 +126,8 @@ def get_open_comment_count(url, user): open_comments=0 review_comments = paginablejson.PaginableJson(url) for review_comment in review_comments: - # In obsolote comments, the commit_id != original_commit_id. - if review_comment['commit_id'] == review_comment['original_commit_id'] and review_comment['user']['login'] == user: + # In obsolote comments, the position is None + if review_comment['position'] is not None and review_comment['user']['login'] == user: open_comments +=1 return open_comments