Repository navigation
Description
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
- Run gh pr create --reviewer "@myorg/my-team" --title "Test" --body "Test"
- Observe output after PR creation
- 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
babakks commentedon Mar 30, 2026
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 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)[/+]decewei commentedon Apr 3, 2026
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.artemkolba321-spec commentedon Apr 4, 2026
mattbowolick commentedon Apr 7, 2026
@babakks my org is without
@in the actual name. The issue was that the cli supported prefixingpr create --reviewer @myorg/my-teambefore and now it doesn't:It's fine for us to swap to the new expected format, but feels like an unintentional breaking change to the cli.
babakks commentedon May 1, 2026
Thanks for confirming, @mattbowolick and @decewei! 🙏
Actually, the
@prefix has always been accepted by the API andghwould just pass it along. So, there may be a breaking change at the API level. I need to follow up with this internally.ATKasem commentedon Jul 10, 2026
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 torequestReviewsByLoginasteamSlugs. Since #12627 the leading@is no longer stripped, so@org/teamreaches the mutation as"@org/team"and fails to resolve.Planned fix: strip a leading
@when building team reviewer slugs (canonicalorg/teamform), restoring the pre-#12627 tolerance, plus a regression test. PR shortly.