Read all commits for a project using the GitHub API -
i'm trying download commits project using github api. i'm attempting commits via branches , via pull requests:
i read commits returned commit api method (e.g., api.github.com/repos/mojombo/grit/commits). take pagination account.
for each branch returned api (e.g., api.github.com/repos/mojombo/grit/branches), read commits (e.g., api.github.com/repos/mojombo/grit/commits?sha=5608567286e64a1c55c5e7fcd415364e04f8986e).
for each pull request returned api (e.g., api.github.com/repos/mojombo/grit/pulls?state=all), read commits (e.g., api.github.com/repos/mojombo/grit/pulls/186/commits).
however, when combine commits retrieved through these methods, there still commits missing. example, 1 https://api.github.com/repos/mojombo/grit/commits/429c045f8313c7734bbb7ae8762edb61f9edcc9a doesn't appear associated branch or pull request. how can ensure all commits associated project?
i guess commits method mentioned doc:
https://developer.github.com/v3/repos/commits/
if you're trying retrieve large ammount of commits, can check since
, until
parameters
Comments
Post a Comment