Skip to content

Commit 53299ec

Browse files
authored
Don't call remove reviewer API when there's nothing to remove (#8071)
1 parent 2124448 commit 53299ec

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/github/pullRequestModel.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1264,6 +1264,9 @@ export class PullRequestModel extends IssueModel<PullRequest> implements IPullRe
12641264
* @param reviewer A GitHub Login
12651265
*/
12661266
async deleteReviewRequest(reviewers: IAccount[], teamReviewers: ITeam[]): Promise<void> {
1267+
if (reviewers.length === 0 && teamReviewers.length === 0) {
1268+
return;
1269+
}
12671270
const { octokit, remote } = await this.githubRepository.ensure();
12681271
await octokit.call(octokit.api.pulls.removeRequestedReviewers, {
12691272
owner: remote.owner,

0 commit comments

Comments
 (0)