shell - How to list all fork Git URLs via GitHub API?
问题描述
I'd like to list all forks and their URLs of specific GitHub repository programmatically through API. I can't see them all on the page, since it has too many forks to display on the website.
How this can be achieved?
解决方案
List of forks can be listed by /repos/:owner/:repo/forks
API call.
To list URLs, the following command can help (sorted by stars):
curl -sq "https://api.github.com/repos/OWNER/REPO/forks?sort=stargazers" | jq '.[]|.html_url'
Note: Change OWNER and REPO with appropriate values.
推荐阅读
- machine-learning - 从最后一层移除 Softmax 会产生更好的结果
- python - 你知道为什么 pip list 显示一个已安装的版本,但 python shell 显示另一个?
- javascript - SlickGrid 自定义过滤器通过已过滤的结果集进行迭代
- c++ - 使用 if-else 对字符串进行排序
- php - 如何使用 PHP 获取 div(项目类)的宽度和高度?
- javascript - 无法在 Firestore 中正确地将数据添加到自定义用户集合
- java - java.sql.SQLException:列计数与第 1 行的值计数不匹配,并且我的数据库的第 1 列是自动记录的
- python - 如何使用 Python 将这种 html 表格转换为 excel?
- visual-studio - 如何从 HoloLens 2 设备获取 Console.Debug 日志
- python - PyQt - 正确通过后显示另一个窗口