GitHub API: Repositories Contributed To

后端 未结 10 1769
耶瑟儿~
耶瑟儿~ 2020-12-07 09:45

Is there a way to get access to the data in the “Repositories contributed to” module on GitHub profile pages via the GitHub API? Ideally the entire list, not just the top fi

10条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-07 10:26

    I came to the problem. (GithubAPI: Get repositories a user has ever committed in)

    One actual hack I've found is that there's a project called http://www.githubarchive.org/ They log all public events starting from 2011. Not ideal, but can be helpful.

    So, for example, in your case:

    SELECT  payload_pull_request_head_repo_clone_url 
    FROM [githubarchive:github.timeline]
    WHERE payload_pull_request_base_user_login='outoftime'
    GROUP BY payload_pull_request_head_repo_clone_url;
    

    Gives, if I'm not mistaken, the list of repos you've pull requested to:

    https://github.com/jreidthompson/noaa.git
    https://github.com/kkrol89/sunspot.git
    https://github.com/rterbush/sunspot.git
    https://github.com/ottbot/cassandra-cql.git
    https://github.com/insoul/cequel.git
    https://github.com/mcordell/noaa.git
    https://github.com/hackhands/sunspot_rails.git
    https://github.com/lgierth/eager_record.git
    https://github.com/jnicklas/sunspot.git
    https://github.com/klclee/sunspot.git
    https://github.com/outoftime/cequel.git
    

    You can play with bigquery here: bigquery.cloud.google.com, data schema can be found here: https://github.com/igrigorik/githubarchive.org/blob/master/bigquery/schema.js

提交回复
热议问题