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

Fix how teams are displayed in requested reviewers #3737

Merged
merged 1 commit into from
Jun 2, 2021

Conversation

mislav
Copy link
Contributor

@mislav mislav commented May 28, 2021

  1. The --json export now only renders the login field for User types and name and slug fields for Team types.
  2. The pr view command now renders team reviewers in the format of ORG/SLUG instead of the team name. This is so that the same value can be used in the pr create -r flag.
## BEFORE
$ gh pr view 123 --json reviewRequests
{
  "reviewRequests": [
    {
      "__typename": "User",
      "login": "monalisa",
      "name": "",
      "slug": "",
      "Organization": {
        "login": ""
      }
    },
    {
      "__typename": "Team",
      "login": "",
      "name": "Some team",
      "slug": "some-team",
      "Organization": {
        "login": "myorg"
      }
    }
  ]
}

## AFTER
$ gh pr view 123 --json reviewRequests
{
  "reviewRequests": [
    {
      "__typename": "User",
      "login": "monalisa"
    },
    {
      "__typename": "Team",
      "name": "Some team",
      "slug": "myorg/some-team"
    }
  ]
}

Followup to #3701

1. The `--json` export now only renders the `login` field for User types
   and `name` and `slug` fields for Team types.
2. The `pr view` command now renders team reviewers in the format of
   `ORG/SLUG` instead of the team name. This is so that the same value
    can be used in the `pr create -r` flag.
@cliAutomation cliAutomation added this to Needs review 🤔 in The GitHub CLI May 28, 2021
Copy link
Contributor

@samcoe samcoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch!

The GitHub CLI automation moved this from Needs review 🤔 to Needs to be merged 🎉 Jun 1, 2021
@mislav mislav merged commit 4960935 into trunk Jun 2, 2021
The GitHub CLI automation moved this from Needs to be merged 🎉 to Pending Release 🥚 Jun 2, 2021
@mislav mislav deleted the requested-reviewers-slug branch June 2, 2021 06:48
@github-actions github-actions bot moved this from Pending Release 🥚 to Done 💤 in The GitHub CLI Jun 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
The GitHub CLI
  
Done 💤
Development

Successfully merging this pull request may close these issues.

None yet

2 participants