在github上阅读项目的PR标题

时间:2017-05-12 10:23:08

标签: github

是否可以阅读github回购的PR标题?

我想对数据进行一些分析,目前我去手动检查标题,有时PR的数量非常大

任何指导都会有所帮助。

1 个答案:

答案 0 :(得分:0)

一种方法是使用GitHub API。例如, 使用someuserjq somerepo获取curlcurl -s https://api.github.com/repos/someuser/somerepo/pulls | jq '[.[] | { url: .url, title: .title }]' 的JSON格式的拉取请求网址及其标题:

[
  {
    "url": "https://api.github.com/repos/SonarSource/sonarlint-visualstudio/pulls/159",
    "title": "Remove the locally copied Alm.Authentication classes and use the NuGe…"
  },
  {
    "url": "https://api.github.com/repos/SonarSource/sonarlint-visualstudio/pulls/108",
    "title": "New settings for Nuget package installation"
  }
]

输出结果如下:

{{1}}