mach10 icon indicating copy to clipboard operation
mach10 copied to clipboard

gh issue view deprecation error

Open m-aebrer opened this issue 8 months ago • 2 comments

● Bash(gh issue view 32)
  ⎿  Error: Exit code 1
     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.issue.projectCards)

● Bash(gh issue view 32 --comments)
  ⎿  Error: Exit code 1
     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.issue.projectCards)

● Bash(gh issue view 32 --json title,body,state,labels,comments 2>/dev/null | python3 -c "import sys,json; d=json.load(sys.stdin); print('Title:', d['title']); print('…)
  ⎿  Title: Add source image reference panel alongside correction UI
     State: OPEN
     ---
     … +49 lines (ctrl+o to expand)

m-aebrer avatar Mar 17 '26 19:03 m-aebrer

Assessment

The root cause is an older gh CLI version. Here's what's happening:

  • Older versions of gh include the projectCards field in the default GraphQL query for gh issue view
  • GitHub has sunset the Projects Classic API (changelog), so that field now returns an error
  • Newer gh versions (e.g., 2.87.3) have updated their queries to remove projectCards, so bare gh issue view works fine
  • The --json workaround succeeds because it constructs a minimal GraphQL query with only the requested fields

Immediate workaround: Upgrade gh to a recent version (2.70+).

Longer-term fix options for mach10:

  1. Document a minimum gh version in the README prerequisites
  2. Migrate bare gh issue view / gh pr view calls to --json format across all commands -- more resilient to version differences and gives structured output

There are 10+ bare gh issue view / gh pr view calls across 11 command files that would be affected. Several commands already use the --json variant successfully.

LeanAndMean avatar Mar 25 '26 14:03 LeanAndMean

updated to gh version 2.88.1 (2026-03-12) and this resolved the issue fully, sorry!

m-aebrer avatar Mar 25 '26 17:03 m-aebrer