mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-05 06:05:30 +02:00
Allow users to self-request a PR review (#19030)
The review request feature was added in https://github.com/go-gitea/gitea/pull/10756, where the doer got explicitly excluded from available reviewers. I don't see a functionality or security related reason to forbid this case. As shown by GitHubs implementation, it may be useful to self-request a review, to be reminded oneselves about reviewing, while communicating to team mates that a review is missing. Co-authored-by: delvh <dev.lh@web.de>
This commit is contained in:
1 parent
e73c5fd698
commit
eceab9e26f
3 files changed
+39
-16
No files matched your search
@@ -140,14 +140,6 @@ func IsValidReviewRequest(reviewer, doer *user_model.User, isAdd bool, issue *mo
|
||||
}
|
||||
}
|
||||
|
||||
if doer.ID == reviewer.ID {
|
||||
return models.ErrNotValidReviewRequest{
|
||||
Reason: "doer can't be reviewer",
|
||||
UserID: doer.ID,
|
||||
RepoID: issue.Repo.ID,
|
||||
}
|
||||
}
|
||||
|
||||
if reviewer.ID == issue.PosterID && issue.OriginalAuthorID == 0 {
|
||||
return models.ErrNotValidReviewRequest{
|
||||
Reason: "poster of pr can't be reviewer",
|
||||
|
||||
Reference in new issue
Block a user