Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
SKairinos committed Jan 6, 2024
1 parent 4a0e9cd commit c49d8cc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/scripts/python/view-pull-request/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ def validate_reviews(pull_request: PullRequest, state: t.Optional[str] = None):
reviews.sort(key=lambda review: review["submittedAt"])

if state is not None:
assert len(reviews) >= 1 and reviews[-1]["state"] == state, (
assert reviews, "The pull request has not been reviewed."
assert 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 c49d8cc

Please sign in to comment.