Skip to content

gh pr create --reviewer fails with @org/team format after v2.88.0 (requestReviewsByLogin regression) #13060

Open

Description

@mattbowolick

Describe the bug

After upgrading to v2.88.0, passing a team reviewer with an @-prefixed slug (e.g. --reviewer "@myorg/my-team") to gh pr create fails with a GraphQL error:

$ gh pr create --reviewer "@myorg/my-team" --title "Test" --body "Test"

https://github.com/org/repo/pull/123

pull request update failed: GraphQL: Could not resolve team with slug '@org/my-team'. (requestReviewsByLogin)

Prior to v2.88.0 this worked correctly. A potential regression was introduced by the switch to login-based reviewer requests in #12627 ? Which now passes reviewer strings verbatim to the requestReviewsByLogin mutation, which does not accept the @ prefix on team slugs.

A number of our CI jobs started to fail after Github Actions auto started using the latest version, we've correct to use no prefix, but this breaking change I assume is a regression and with/without @ prefix should still be supported.

Affected version

gh version 2.89.0 (2026-03-26)
https://github.com/cli/cli/releases/tag/v2.89.0

Steps to reproduce the behavior

  1. Run gh pr create --reviewer "@myorg/my-team" --title "Test" --body "Test"
  2. Observe output after PR creation
  3. See error: pull request update failed: GraphQL: Could not resolve team with slug '@myorg/my-team'. (requestReviewsByLogin)

Expected vs actual behavior

Expected: --reviewer "@myorg/my-team" requests a review from the team, consistent with behaviour in ≤v2.87.3 where the @ prefix was tolerated.

Actual: The PR is created successfully but the reviewer request fails. The @ prefix is passed verbatim to requestReviewsByLogin as teamSlugs: ["@myorg/my-team"], which GitHub cannot resolve. The workaround is --reviewer "myorg/my-team".

Logs

 $ GH_DEBUG=api gh pr create --title "Test PR" --body "testing" --reviewer "@myorg/my-team"

  > User-Agent: GitHub CLI 2.89.0

  mutation RequestReviewsByLogin($input:RequestReviewsByLoginInput!)
  variables: {"teamSlugs":["@myorg/my-team"],"userLogins":[],"botLogins":[],"union":true}

  {
    "data": { "requestReviewsByLogin": null },
    "errors": [
      {
        "type": "NOT_FOUND",
        "message": "Could not resolve team with slug '@myorg/my-team'."
      }
    ]
  }

  pull request update failed: GraphQL: Could not resolve team with slug '@myorg/my-team'.
  (requestReviewsByLogin)

Activity

  1. babakks commented on Mar 30, 2026

    @babakks
    Member

    Thanks for reporting this, @mattbowolick! 🙏

    As I understand, your org name is prefixed with @. But I cannot see any way to create such an org (at least through GUI), as it'll drop those unallowed chars. So, maybe your org's actual name is without @? Can you please confirm this?

    You can try this and share the output (redact where needed):

    gh api '/orgs/@myorg'
    
  2. added
    more-info-needed
    on Mar 30, 2026
  3. changed the title [-]gh pr create --reviewer fails with @org/team format after v2.88.0 (requestReviewsByLogin regression)[/-] [+]`gh pr create --reviewer` fails with @org/team format after v2.88.0 (requestReviewsByLogin regression)[/+] on Mar 30, 2026
  4. decewei commented on Apr 3, 2026

    @decewei

    I ran into the same issue, removing @ works but this was the syntax that is allowed before. I don't think it should break the existing command that works.

  5. artemkolba321-spec commented on Apr 4, 2026

    @artemkolba321-spec
  6. mattbowolick commented on Apr 7, 2026

    @mattbowolick
    Author

    @babakks my org is without @ in the actual name. The issue was that the cli supported prefixing pr create --reviewer @myorg/my-team before and now it doesn't:

    # < gh version v2.88.0
    pr create --reviewer @myorg/my-team ✅ creates pr with assigned group 
    pr create --reviewer myorg/my-team ✅ creates pr with assigned group 
    
    # >= gh version v2.88.0
    pr create --reviewer @myorg/my-team ❌ fails to create pr entirely
    pr create --reviewer myorg/my-team ✅ creates pr with assigned group 

    It's fine for us to swap to the new expected format, but feels like an unintentional breaking change to the cli.

  7. removed
    more-info-needed
    on Apr 7, 2026
  8. added
    bug
    priority-3
    gh-pr
    on Apr 30, 2026
  9. removed
    needs-triage
    on Apr 30, 2026
  10. babakks commented on May 1, 2026

    @babakks
    Member

    Thanks for confirming, @mattbowolick and @decewei! 🙏

    Actually, the @ prefix has always been accepted by the API and gh would just pass it along. So, there may be a breaking change at the API level. I need to follow up with this internally.

  11. added
    platform
    on May 1, 2026
  12. ATKasem commented on Jul 10, 2026

    @ATKasem

    I'd like to take this one.

    Confirmed the regression: in AddMetadataToIssueParams (pkg/cmd/pr/shared/params.go), reviewer strings containing / are categorized as team slugs and, on github.com (the login path), passed verbatim to requestReviewsByLogin as teamSlugs. Since #12627 the leading @ is no longer stripped, so @org/team reaches the mutation as "@org/team" and fails to resolve.

    Planned fix: strip a leading @ when building team reviewer slugs (canonical org/team form), restoring the pre-#12627 tolerance, plus a regression test. PR shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    buggh-prplatformpriority-3

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions