Browse Source

#882

remove watcher from reviewers
tags/v1.21.12.1^2
chenyifan01 4 years ago
parent
commit
13974937af
1 changed files with 2 additions and 6 deletions
  1. +2
    -6
      models/repo.go

+ 2
- 6
models/repo.go View File

@@ -667,15 +667,11 @@ func (repo *Repository) getReviewersPublic(e Engine, doerID, posterID int64) (_
users := make([]*User, 0)

const SQLCmd = "SELECT * FROM `user` WHERE id IN ( " +
"SELECT user_id FROM `access` WHERE repo_id = ? AND mode >= ? AND user_id NOT IN ( ?, ?) " +
"UNION " +
"SELECT user_id FROM `watch` WHERE repo_id = ? AND user_id NOT IN ( ?, ?) AND mode IN (?, ?) " +
") ORDER BY name"
"SELECT user_id FROM `access` WHERE repo_id = ? AND mode >= ? AND user_id NOT IN ( ?, ?) ) ORDER BY name "

if err = e.
SQL(SQLCmd,
repo.ID, AccessModeRead, doerID, posterID,
repo.ID, doerID, posterID, RepoWatchModeNormal, RepoWatchModeAuto).
repo.ID, AccessModeRead, doerID, posterID).
Find(&users); err != nil {
return nil, err
}


Loading…
Cancel
Save