aboutsummaryrefslogtreecommitdiffstats
path: root/services/issue/assignee.go
diff options
context:
space:
mode:
authorNorwin <noerw@users.noreply.github.com>2022-03-08 22:48:47 +0100
committerGitHub <noreply@github.com>2022-03-08 22:48:47 +0100
commiteceab9e26f671318d3b50e622736a514f384aee6 (patch)
treeac83f24a8114aaef59e0ef225f4a2bfccbb8b179 /services/issue/assignee.go
parente73c5fd698a8979a015c43625941aa82ac7a8bf9 (diff)
downloadgitea-eceab9e26f671318d3b50e622736a514f384aee6.tar.gz
gitea-eceab9e26f671318d3b50e622736a514f384aee6.zip
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>
Diffstat (limited to 'services/issue/assignee.go')
-rw-r--r--services/issue/assignee.go8
1 files changed, 0 insertions, 8 deletions
diff --git a/services/issue/assignee.go b/services/issue/assignee.go
index 4fdf0029c8..f09c51293b 100644
--- a/services/issue/assignee.go
+++ b/services/issue/assignee.go
@@ -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",