From 3e7f6f42f5ecb93323400fd6060efe0a5c94ebd8 Mon Sep 17 00:00:00 2001 From: SKairinos Date: Fri, 5 Jan 2024 16:27:32 +0000 Subject: [PATCH] fix assertion --- .github/scripts/python/validate-pull-request/__main__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/scripts/python/validate-pull-request/__main__.py b/.github/scripts/python/validate-pull-request/__main__.py index 1692b375..7fc896e4 100644 --- a/.github/scripts/python/validate-pull-request/__main__.py +++ b/.github/scripts/python/validate-pull-request/__main__.py @@ -55,7 +55,7 @@ def validate_reviews(number: int, state: t.Optional[str] = None): reviews.sort(key=lambda review: review["submittedAt"]) if state is not None: - assert not reviews or reviews[-1]["state"] != state, ( + assert reviews and reviews[-1]["state"] == state, ( "The latest review is not in the expected state." f' Latest: "{reviews[-1]["state"]}". Expected: "{state}".' )