Skip to content

Commit

Permalink
Improve handling of varios reviewer types (#6509)
Browse files Browse the repository at this point in the history
Part of #6090
  • Loading branch information
alexr00 authored Dec 4, 2024
1 parent 884227a commit 3855f0f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/github/pullRequestModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -988,7 +988,7 @@ export class PullRequestModel extends IssueModel<PullRequest> implements IPullRe
input: {
pullRequestId: this.graphNodeId,
teamIds: teamReviewers,
userIds: reviewers
userIds: reviewers.filter(r => !r.startsWith('BOT')),
},
},
});
Expand Down
16 changes: 10 additions & 6 deletions src/github/queriesShared.gql
Original file line number Diff line number Diff line change
Expand Up @@ -126,13 +126,14 @@ fragment Review on PullRequestReview {
login
avatarUrl
url
... on Node {
id
}
... on User {
email
id
}
... on Organization {
email
id
}
}
state
Expand Down Expand Up @@ -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
}
}
}
Expand Down

0 comments on commit 3855f0f

Please sign in to comment.