使用 REST API 更新现有 Gist 中的特定行

问题描述 投票:0回答:0

有没有办法在 Linux 中使用 REST API 编辑 Gist 中的特定行?

这是所需更新的电话

curl -L \
  -X PATCH \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer <YOUR-TOKEN>"\
  -H "X-GitHub-Api-Version: 2022-11-28" \
  https://api.github.com/gists/GIST_ID \
  -d '{"description":"An updated gist description","files":{"README.md":{"content":"Hello World from GitHub"}}}'

仍然,

{"content":"Hello World from GitHub"}
部分将更新整个要点。

尝试使用 GitHUB CLI,但效果相似。

bash github github-api gist
© www.soinside.com 2019 - 2024. All rights reserved.