[verified] Fix native review PR Issue counter projection

This commit is contained in:
2026-10-14 06:20:07 +00:00
parent 6cddc26bb7
commit f5ef03418e
3 changed files with 51 additions and 4 deletions
@@ -603,7 +603,9 @@ def _source_issue_reference(before, after, event, target, pr_url, reviewer_id, c
pr_issue['updated_at'] not in causal_times):
_fail('PR Issue drift')
old_count, count = old_pr_issue.get('comments'), pr_issue.get('comments')
if type(old_count) is not int or old_count < 0 or type(count) is not int or count != old_count + 1:
# CommentTypeReview does not increment Issue.NumComments (Gitea 1.27.3).
# The independent PR review_comments +1 check remains in verify_publication.
if type(old_count) is not int or old_count < 0 or type(count) is not int or count != old_count:
_fail('PR Issue count projection mismatch')
old_events = _index(before['issue_timeline'])
events = _index(after['issue_timeline'])