Let the view know about the review status of the PR#1833
Let the view know about the review status of the PR#1833alexr00 merged 8 commits intomicrosoft:mainfrom
Conversation
The PR model should send the review status of the PR to the view.
alexr00
left a comment
There was a problem hiding this comment.
This PR is looking good! If the merge conflicts are resolved I will take another look.
|
@alexr00 Thanks for reviewing it. I will resolve the conflicts. I hope I can get back quickly, it has been a year since I have worked on VSCPR |
alexr00
left a comment
There was a problem hiding this comment.
Thanks for the updates! Just one more question.
webviews/common/context.tsx
Outdated
| }); | ||
| state.reviewers = reviewers; | ||
| state.events = [...state.events.filter(e => (isReviewEvent(e) ? e.state !== 'PENDING' : e)), review]; | ||
| state.reviewState = review.state; |
There was a problem hiding this comment.
Is a check needed here to make sure that the review is from the current user?
There was a problem hiding this comment.
@alexr00 I did not see a need to check if the review is from the current user. As this refers to the review state of the PR for the current user. It is required to enable/disable the Approve button on the overview of the PR.
When the PR panel is shown it always refers to the review state from the current user for the PR based on the return from pullRequestOverview.ts#L153
When the reviewer makes changes to the PR review always refers to the current user's review on the PR.
Please let me know if I am missing anything here, I am happy to make changes/updates
Fixes #473
The PR model must find the current user's review status for the PR and send it to the view.
Let me know if it requires any further changes.