Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Review request of teams is not supported #2122

Closed
ch1seL opened this issue Mar 4, 2020 · 7 comments · Fixed by #2153
Closed

Review request of teams is not supported #2122

ch1seL opened this issue Mar 4, 2020 · 7 comments · Fixed by #2153
Assignees
Labels
Type: Bug Something isn't working as documented

Comments

@ch1seL
Copy link
Contributor

ch1seL commented Mar 4, 2020

Pull request entity of GitHub API contains requested_teams property with an array of team slugs that will be requested but it missed in Octokit.PullRequest entity
Also, Review Requests entity contains similar teams property but Octokit.IPullRequestReviewRequestsClient gets the list of requested users only without teams

@nrukavkov
Copy link

+1

1 similar comment
@IvanQL
Copy link

IvanQL commented Mar 4, 2020

+1

@LadyGuGa
Copy link

LadyGuGa commented Mar 4, 2020

+1

3 similar comments
@nkirsanov
Copy link

+1

@AlexandraKim
Copy link

+1

@dbeylkhanov
Copy link

+1

@shiftkey
Copy link
Member

shiftkey commented Mar 5, 2020

Also, Review Requests entity contains similar teams property but Octokit.IPullRequestReviewRequestsClient gets the list of requested users only without teams

I think this the APIs as currently implemented are not designed to match the response returned from the GitHub API:

GET /repos/:owner/:repo/pulls/:pull_number/requested_reviewers

{
  "users": [
    {
      "login": "octocat",
      "id": 1,
      "node_id": "MDQ6VXNlcjE=",
      "avatar_url": "https://github.com/images/error/octocat_happy.gif",
      "gravatar_id": "",
      "url": "https://api.github.com/users/octocat",
      "html_url": "https://github.com/octocat",
      "followers_url": "https://api.github.com/users/octocat/followers",
      "following_url": "https://api.github.com/users/octocat/following{/other_user}",
      "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
      "organizations_url": "https://api.github.com/users/octocat/orgs",
      "repos_url": "https://api.github.com/users/octocat/repos",
      "events_url": "https://api.github.com/users/octocat/events{/privacy}",
      "received_events_url": "https://api.github.com/users/octocat/received_events",
      "type": "User",
      "site_admin": false
    }
  ],
  "teams": [
    {
      "id": 1,
      "node_id": "MDQ6VGVhbTE=",
      "url": "https://api.github.com/teams/1",
      "html_url": "https://api.github.com/teams/justice-league",
      "name": "Justice League",
      "slug": "justice-league",
      "description": "A great team.",
      "privacy": "closed",
      "permission": "admin",
      "members_url": "https://api.github.com/teams/1/members{/member}",
      "repositories_url": "https://api.github.com/teams/1/repos",
      "parent": null
    }
  ]
}

I'm going to drop the up-for-grabs here as there's a bit we need to do here:

  • confirm the current client doesn't deserialize correctly
  • add unit and integration tests for the correct API
  • figure out the right implementation for receiving users and teams
  • figure out how to gracefully deprecate the current API

@shiftkey shiftkey self-assigned this Mar 5, 2020
@nickfloyd nickfloyd added Type: Bug Something isn't working as documented and removed category: bug labels Oct 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working as documented
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants