gh-update-pr
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseUpdate PR via REST API
通过REST API更新PR
gh pr editprojectCards由于GitHub弃用Projects Classic(出现 GraphQL字段错误),命令已无法正常工作。请改用REST API。
projectCardsgh pr editRules
规则
- Never use to update PR title or body. It will fail with a GraphQL error.
gh pr edit - Use with the REST endpoint:
gh apibashgh api repos/{owner}/{repo}/pulls/{number} -X PATCH -f title="..." -f body="..." --jq '.html_url' - To get the current PR number and repo, use:
bash
gh pr view --json number,url,baseRefName - and
gh pr viewstill work fine. Onlygh pr createis affected.gh pr edit
- **切勿使用**来更新PR标题或正文,否则会出现GraphQL错误。
gh pr edit - 使用调用REST端点:
gh apibashgh api repos/{owner}/{repo}/pulls/{number} -X PATCH -f title="..." -f body="..." --jq '.html_url' - 要获取当前PR编号和仓库信息,使用:
bash
gh pr view --json number,url,baseRefName - 和
gh pr view仍可正常使用,仅gh pr create受影响。gh pr edit