reviews: only consider latest user reviews (#77536)
gitea/gitea-eo-custom/pipeline/head This commit looks good Details

This commit is contained in:
Frédéric Péters 2023-05-12 13:40:58 +02:00
parent 41ebe2196b
commit f98231d1c6
1 changed files with 5 additions and 0 deletions

View File

@ -22,6 +22,11 @@ cursor.execute(
and issue.is_closed = false
and pull_request.issue_id = issue.id
and pull_request.has_merged = false
and review.id in (select max(id) from review
where issue_id = issue.id
and review.type in (1, 3, 4)
and reviewer_id = reviewer_id
and dismissed = false)
order by "user".full_name, repository.name, review.created_unix
"""
)