-
Notifications
You must be signed in to change notification settings - Fork 8.2k
gh pr edit fails with Projects (classic) deprecation error even without --add-project flag #11983
Copy link
Copy link
Closed
Labels
gh-prrelating to the gh pr commandrelating to the gh pr commandneeds-triageneeds to be reviewedneeds to be reviewed
Description
Describe the bug
gh pr edit command fails with GraphQL error about Projects (classic) deprecation, even when not using any project-related flags.
Affected version
gh version 2.45.0 (2025-07-18 Ubuntu 2.45.0-1ubuntu0.3)
https://github.com/cli/cli/releases/tag/v2.45.0
Steps to reproduce
- Have a repository with an existing PR
- Run:
gh pr edit <pr_number> --body-file /tmp/release-pr.md - See error
Error output
GraphQL: Projects (classic) is being deprecated in favor of the new Projects experience, see: https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/. (repository.pullRequest.projectCards)
Expected vs actual behavior
Expected: PR body should be updated successfully
Actual: Command fails with GraphQL error about Projects (classic) deprecation
Additional context
- This appears to be a regression or incomplete fix of
gh pr editreturns an error with--add-project#10681 (closed in April 2025) - The error occurs even when NOT using
--add-projectflag - The error suggests
ghis queryingprojectCardsfield even when not needed - This affects automated release workflows that update PR descriptions
Workaround
None currently available - the command completely fails.
Suggested fix
The GitHub CLI should:
- Not query
projectCardsfield unless explicitly needed (e.g., when using--add-project) - Handle the deprecation warning gracefully instead of treating it as a fatal error
- Use the new Projects V2 API instead of Projects (classic)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
gh-prrelating to the gh pr commandrelating to the gh pr commandneeds-triageneeds to be reviewedneeds to be reviewed
Type
Fields
Give feedbackNo fields configured for issues without a type.