From 6110640a6fac414b8294bba35f0c21f23327e9c0 Mon Sep 17 00:00:00 2001 From: Karma Riuk Date: Tue, 3 Jun 2025 13:39:02 +0200 Subject: [PATCH] fixed condition to check whether a comment was within the diffs --- pull_requests.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pull_requests.py b/pull_requests.py index 7be4688..fbbc31c 100644 --- a/pull_requests.py +++ b/pull_requests.py @@ -212,7 +212,9 @@ def ensure_comments_within_diffs(comments: list[Comment], diffs_before: dict[str # 3) Check that comment.from_ lies in at least one of these old‐file ranges in_any_range = False for start, end in old_ranges + new_ranges: - if comment.from_ is not None and start <= comment.from_ <= end: + if ( + comment.from_ is not None and start <= comment.from_ <= end + ) or start <= comment.to <= end: in_any_range = True break