有没有办法在 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,但效果相似。