如何獲取與專案提交哈希相關的 github 評論?
假設我們有這個 github 提交 https://github.com/actions/checkout/commit/5126516654c75f76bca1de45dd82a3006d8890f9
如何使用命令列 gh 命令獲取其注釋?Github cli? https://github.com/cli/cli
uj5u.com熱心網友回復:
我剛剛嘗試了這種gh api方法,使用get commit API:
get /repos/{owner}/{repo}/commits/{ref}
gh api repos/actions/checkout/commits/5126516654c75f76bca1de45dd82a3006d8890f9 \
--jq ".commit.message"
結果:
Bump minimist from 1.2.5 to 1.2.6 (#741)
Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)
---
updated-dependencies:
- dependency-name: minimist
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333 dependabot[bot]@users.noreply.github.com>
轉載請註明出處,本文鏈接:https://www.uj5u.com/qiye/454900.html
標籤:github github-cli
