-
-
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 reviewers selection to new pull request fixes #26289 #32403
base: main
Are you sure you want to change the base?
Conversation
this needs to be a negative integer
logics for fetching reviewers in pull requests is now placed in the RetrieveRepoMetas
the review requet notifaction is now sent after the new pull request notification.
Thank you all for the work. Actually IMO there are still problems in this PR, for example: incorrect CSS classes like There is also a blocker in repo-legacy.ts, I have proposed a refactoring PR "Refactor repo legacy #32404", after #32404, I could help to resolve the conflicts here and fix the problems. |
Does this replace #26596 ? |
routers/web/repo/issue.go
Outdated
if isPull { | ||
if len(form.ReviewerIDs) > 0 { |
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.
if isPull { | |
if len(form.ReviewerIDs) > 0 { | |
if isPull && len(form.ReviewerIDs) > 0 { |
Some gt-* classes were replaced by the crossponding tw-* classes.
Team has negative ID while Users has positive. We need to use TeamReviewRequest for teams and ReviewRequest for a individual user. Also, we have to validate the permissions before send out the notification
web_src/js/features/repo-legacy.ts
Outdated
@@ -243,7 +243,8 @@ export function initRepoCommentForm() { | |||
initListSubmits('select-label', 'labels'); | |||
initListSubmits('select-assignees', 'assignees'); | |||
initListSubmits('select-assignees-modify', 'assignees'); | |||
initListSubmits('select-reviewers-modify', 'assignees'); | |||
initListSubmits('select-reviewers', 'reviewers'); | |||
initListSubmits('select-reviewers-modify', 'reviewers'); |
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.
What is select-reviewers-modify
? Why it was changed to 'reviewers'
?
(see below: #32403 (comment))
@@ -265,10 +267,12 @@ export function initRepoIssueSidebar() { | |||
initListSubmits('select-label', 'labels'); | |||
initListSubmits('select-assignees', 'assignees'); | |||
initListSubmits('select-assignees-modify', 'assignees'); | |||
initListSubmits('select-reviewers', 'reviewers'); | |||
initListSubmits('select-reviewers-modify', 'assignees'); |
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.
I have resolved some conflicts. But here I haven't read it carefully.
This PR ever changed it to initListSubmits('select-reviewers-modify', 'reviewers');
Was it done intentionally? If yes, what's the reason behind it?
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.
Hi, the class for reviewer list has changed to ui reviewers list
so I was expecting the initListSubmits
should init that list too.
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.
I do not think changing select-reviewers-modify
is right. I do not see any change related to select-reviewers-modify
in this PR
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.
You are probably right. I double checked the select-reviewers-modify
and found that it only applied to the sidebar for a created pull request. And that is distinguished from the select-reviewers
.While this is true, I think I've done something wrong based on my previous understanding. Allow me to spend sometime working on it. Thanks for the correction.
Hi, I've not done this before, so bear with me. I tried to make changes on @splitt3r 's pull request but was rejected due to a permission issue. Therefore, I had to fork my own repository and incorporate what was done in that pull request. In addition to @splitt3r and @sebastian-sauer's commits, I've also added a commit to resolve the conflicts. Furthermore, I have included two other commits to address @jpraet 's comments.
Please let me know if there is anything else I need to address. Thank you!