我需要列出我的存储库目录下的所有文件名。
以下 api 可以列出根目录中的文件名和目录。
https://api.github.com/repos/username/repo-name/git/trees/master?recursive=1
发现没有合适的 api 来明智地列出目录!
使用https://api.github.com/repos/{owner}/{repo}/contents/{path}
请参阅此处的文档:https ://docs.github.com/en/rest/reference/repos#get-repository-content
| 归档时间: |
|
| 查看次数: |
2302 次 |
| 最近记录: |