From 3855f0fed6bf2d2377585d7175413abfce8964f6 Mon Sep 17 00:00:00 2001 From: Alex Ross Date: Wed, 4 Dec 2024 18:51:09 +0100 Subject: [PATCH] Improve handling of varios reviewer types (#6509) Part of #6090 --- src/github/pullRequestModel.ts | 2 +- src/github/queriesShared.gql | 16 ++++++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/github/pullRequestModel.ts b/src/github/pullRequestModel.ts index a45470c6b9..1306295bd6 100644 --- a/src/github/pullRequestModel.ts +++ b/src/github/pullRequestModel.ts @@ -988,7 +988,7 @@ export class PullRequestModel extends IssueModel implements IPullRe input: { pullRequestId: this.graphNodeId, teamIds: teamReviewers, - userIds: reviewers + userIds: reviewers.filter(r => !r.startsWith('BOT')), }, }, }); diff --git a/src/github/queriesShared.gql b/src/github/queriesShared.gql index 768081ddac..63d4f7402a 100644 --- a/src/github/queriesShared.gql +++ b/src/github/queriesShared.gql @@ -126,13 +126,14 @@ fragment Review on PullRequestReview { login avatarUrl url + ... on Node { + id + } ... on User { email - id } ... on Organization { email - id } } state @@ -318,20 +319,23 @@ query GetReviewRequestsAdditionalScopes($owner: String!, $name: String!, $number reviewRequests(first: 100) { nodes { requestedReviewer { - ... on User { + ... on Node { + id + } + ... on Actor { login avatarUrl - id + } + ... on User { url email name } - ... on Team { + ... on Team { # Team is not an Actor name avatarUrl url slug - id } } }