Update PR via REST API
gh pr edit is broken due to GitHub deprecating Projects Classic (projectCards GraphQL field error). Use the REST API instead.
Rules
- Never use
gh pr editto update PR title or body. It will fail with a GraphQL error. - Use
gh apiwith the REST endpoint:gh api repos/{owner}/{repo}/pulls/{number} -X PATCH -f title="..." -f body="..." --jq '.html_url' - To get the current PR number and repo, use:
gh pr view --json number,url,baseRefName gh pr viewandgh pr createstill work fine. Onlygh pr editis affected.