-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add request review from specific reviewers feature in pull request #10756
Conversation
f4688ad
to
8c621b8
Compare
8c621b8
to
4b85deb
Compare
@lafriks Thanks for your checking! |
cf78f26
to
f448857
Compare
37d73d5
to
6fe0d36
Compare
6fe0d36
to
d98e20a
Compare
Codecov Report
@@ Coverage Diff @@
## master #10756 +/- ##
==========================================
- Coverage 43.62% 43.47% -0.16%
==========================================
Files 597 597
Lines 83923 84252 +329
==========================================
+ Hits 36614 36625 +11
- Misses 42797 43113 +316
- Partials 4512 4514 +2
Continue to review full report at Codecov.
|
d98e20a
to
9233962
Compare
routers/repo/issue.go
Outdated
for _, issue := range issues { | ||
if issue.IsPull { | ||
|
||
if isReRequest && issue.PosterID != ctx.User.ID { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, updating my list, I still think the reviewers should be able to dismiss themselves, regardless of what permissions they have.
Also, people with write permissions should not be able to dismiss any review (I as a maintainer am not allowed to dismiss other maintainer's review here in Github). Admins/owners should.
Having said that, Gitea does have its own personality, so some tasks are not entirely resolved the same way as Github. For example, reviewer whitelists are handled separately from PR write access, so we must be careful on what we can copy and what we should reconsider.
9233962
to
69e40d6
Compare
@guillep2k hello, I have changed it follow your suggestions, about reviewers who can be requested to review, add all readers for private repo, but olny add all watchers and writers in repo , because , readers mean all user in the platform for a public repo, but It's not necessary, Because people who don't watch it won't like to make a review for this repo. |
I'm not sure using the watchers list is a good idea. A public repository's branch could have a very limited number of reviewers, and they may or may not be watching the repo. Or repositories like Gitea may have hundreds of watchers (currently 460). Maybe we could use the "watchers" function for branches that are not protected (or have no reviewer restrictions) but use the list of official/whitelisted reviewers when the target branch has one. By the way, a public repository whose owner is a hidden organization (visible: false) should be considered like a private repository. |
@guillep2k Hello, I'm sorry , but I can't fully agree with you, first this list only show who can be requested to review not help users to choose, And in gitea any user who can read can make a review. but for the public repo, which will become a problem , Because if not have some additional limit, which will mean all users in the platform should in this list, but it's not necessary. So only add offical users (which can found in accesses table) and watchers, but I really forget the whitelisted reviewers for protect branches, they should alse be check and add to this list. and also because this list may become very big I add a filter box which is provided by "Semantic UI" , and may be it should become a search because load many users may cost too much time, but now I have no idea about how to do it . that's my think. thanks |
As long as the explicitly whitelisted users or groups for the target branch are included in the list, I'm OK with that (I don't mean when "everyone" is allowed). |
@guillep2k Hello, after carefully check , I think It's not necessary to load whitelisted users or groups gitea/routers/repo/setting_protected_branch.go Lines 120 to 125 in 209045f
they just use users who can found in accesses table. and all users in the teams of the own organization can be found in by this way also. So , that means after these code. all users who can be choose into whitelisted users or the groups has been loaded by these codes: |
69e40d6
to
2f93971
Compare
dd90068
to
29a6d24
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, this was a long journey. Great job!!
Please resolve the conflicts. |
…ists also change icon for review requests to eye
Hello, I have resolved the conflicts and do some ui changes, please review , Thanks. |
Great work, looks good now ;) |
Make lgtm work |
It's better to add the feature in comparsion doc. |
…o-gitea#10756) * add request review feature in pull request add a way to notify specific reviewers to review like github , by add or delet a special type review . The acton is is similar to Assign , so many code reuse the function and items of Assignee, but the meaning and result is different. The Permission style is is similar to github, that only writer can add a review request from Reviewers, but the poster can recall and remove a review request after a reviwer has revied even if he don't have Write Premission. only manager , the poster and reviewer of a request review can remove it. The reviewers can be requested to review contain all readers for private repo , for public, contain all writers and watchers. The offical Review Request will block merge if Reject can block it. an other change: add ui otify for Assignees. Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com> Co-authored-by: Lauris BH <lauris@nix.lv> Signed-off-by: a1012112796 <1012112796@qq.com> * new change * add placeholder string * do some changes follow go-gitea#10238 to add review requests num on lists also change icon for review requests to eye Co-authored-by: Lauris BH <lauris@nix.lv>
add a way to notify specific reviewers to review like github , by add or delet a special type
review . The acton is is similar to Assign , so many code reuse the function and items of
Assignee, but the meaning and result is different.
The Permission style is is similar to github, that only writer can add a review request from Reviewers,
but the poster can recall and remove a review request after a reviwer has revied even if he don't have
Write Premission. only manager , the poster and reviewer of a request review can remove it.
The reviewers can be requested to review contain all readers for private repo , for public, contain
all writers and watchers.
The offical Review Request will block merge if Reject can block it.
an other change: add ui otify for Assignees.
screenshots: