Skip to content

Commit

Permalink
Fix conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
alexr00 committed Mar 30, 2023
1 parent 35525bd commit 649a2b7
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/github/activityBarViewProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { dispose, formatError } from '../common/utils';
import { getNonce, IRequestMessage, WebviewViewBase } from '../common/webview';
import { ReviewManager } from '../view/reviewManager';
import { FolderRepositoryManager } from './folderRepositoryManager';
import { GithubItemStateEnum, reviewerId, ReviewEvent, ReviewState } from './interface';
import { GithubItemStateEnum, isTeam, reviewerId, ReviewEvent, ReviewState } from './interface';
import { PullRequestModel } from './pullRequestModel';
import { getDefaultMergeMethod } from './pullRequestOverview';
import { PullRequestView } from './pullRequestOverviewCommon';
Expand Down Expand Up @@ -116,8 +116,15 @@ export class PullRequestViewProvider extends WebviewViewBase implements vscode.W
}

private reRequestReview(message: IRequestMessage<string>): void {
this._item.requestReview([message.args]).then(() => {
const reviewer = this._existingReviewers.find(reviewer => reviewer.reviewer.login === message.args);
const reviewer = this._existingReviewers.find(reviewer => reviewerId(reviewer.reviewer) === message.args);
const userReviewers: string[] = [];
const teamReviewers: string[] = [];
if (reviewer && isTeam(reviewer.reviewer)) {
teamReviewers.push(reviewer.reviewer.id);
} else if (reviewer && !isTeam(reviewer.reviewer)) {
userReviewers.push(reviewer.reviewer.login);
}
this._item.requestReview(userReviewers, teamReviewers).then(() => {
if (reviewer) {
reviewer.state = 'REQUESTED';
}
Expand Down

0 comments on commit 649a2b7

Please sign in to comment.