Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(github): teams with access show in the reviewer picker #31150

Closedipanasenko(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/31150/headopened View on GitHub

Showing 6 changed files with 132 additions and 43 deletions (loading 3).

x
0 of 6 viewed, 6 left
69 additions and 36 deletionspackages/source-control-github/src/server/GitHubPullRequestApi.test.tsModified
View file
@@ -3770,42 +3770,74 @@
- it.effect("reads who may review and who already has in one request", () =>
+ const reviewerTeam = {
+ slug: "web",
+ combinedSlug: "acme/web",
+ name: "Web",
+ avatarUrl: null,
+ repositories: { nodes: [{ nameWithOwner: "acme/web" }] },
+ };
+ it.effect.each([
+ {
+ name: "lists teams with access beside the people",
+ teams: {
+ data: {
+ organization: { teams: { pageInfo: { hasNextPage: false }, nodes: [reviewerTeam] } },
+ },
+ },
+ expected: [
+ ["octocat", true],
+ ["acme/web", false],
+ ["hubot", false],
+ ],
+ },
+ {
+ name: "still lists the people when the token cannot read the organization's teams",
+ teams: {
+ data: null,