Description
- Gitea version (or commit ref): 1.12.1
- Can you reproduce the bug at https://try.gitea.io:
Sorry, cannot answer the following information, as I'm not hosting the Gitea instance myself. AFAIK, it doesn't play a role either.
- Git version:
- Operating system:
- Database
- PostgreSQL
- MySQL
- MSSQL
- SQLite
- Log gist:
Description
With #9592, blocking merging a pull request was enabled, if one reviewer requested changes on the code. However, with ef89e75 (regarding #10756) the checks got extended to also cover the case if one explicitly requested reviewer hasn't given any comments yet. I feel a bit confused about this in two ways.
Think of the following test case (cf. also the test repo):
- Globally I require at least 1 review
- In a specific PR I ask two people to review
- One hasn't answered, yet. The other has approved without any change request
The information, why merging is blocked is misleading
As far as I was able to get from your code, the reason, why a pull request merge is blocked, is determined here:
Lines 1435 to 1445 in 1bb5c09
However, obviously the condition is true also, if nobody requested changes, but still one of the explicitly requested reviewers didn't answer yet. This leads to the misleading prompt, that requested changes not have been addressed, yet.
My suggestion would be to spin of Branch#MergeBlockedByExplcitReviewRequest
from Branch#MergeBlockedByRejectedReview
and have both conditions separated.
The explicit review request override my global config
As with GitHub, I would expect, that everything is fine to be merged, as long as one reviewer has replied with approval. However, current implementation blocks the merge with no need. Despite me not finding it handy to require all requested reviews, at least it is not clear, that this is the case. Maybe a renaming of the label for review requests from "Reviewers" to "Mandatory Reviewers" would point out clearly, what it's about (cf. Screenshot).