Skip to content

Fix how teams are displayed in requested reviewers#3737

Merged
mislav merged 1 commit intotrunkfrom
requested-reviewers-slug
Jun 2, 2021
Merged

Fix how teams are displayed in requested reviewers#3737
mislav merged 1 commit intotrunkfrom
requested-reviewers-slug

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.
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!

@mislav mislav merged commit 4960935 into trunk Jun 2, 2021
@mislav mislav deleted the requested-reviewers-slug branch June 2, 2021 06:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants