Skip to content

Commit

Permalink
fix assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
SKairinos committed Jan 5, 2024
1 parent 25e98a6 commit 3e7f6f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/scripts/python/validate-pull-request/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}".'
)
Expand Down

0 comments on commit 3e7f6f4

Please sign in to comment.