GitHubでコラボレータの一覧を見る方法
表題の件、GitHubで自分がownerじゃないリポジトリの collaborators のリストを見たかったんですが、どう探しても画面が見つからなかった。 ググったら一瞬で出てきて、API 呼び出しで開けると判明。
書式 : https://api.github.com/repos/:user/:repo/collaborators
:user
と :repo
はいつものアレです。
GitBucketのリポジトリの場合 : https://api.github.com/repos/takezoe/gitbucket/collaborators
開くとこんな感じの JSON が返却されます。やっぱAPIはあると便利そうだなぁ。ツールによるエコシステムが作れる。
[ { "login": "takezoe", ... }, { "login": "tanacasino", "id": 748569, "avatar_url": "https://avatars.githubusercontent.com/u/748569?", "gravatar_id": "41a305def5c9002faf646e11be0a657a", "url": "https://api.github.com/users/tanacasino", "html_url": "https://github.com/tanacasino", "followers_url": "https://api.github.com/users/tanacasino/followers", "following_url": "https://api.github.com/users/tanacasino/following{/other_user}", "gists_url": "https://api.github.com/users/tanacasino/gists{/gist_id}", "starred_url": "https://api.github.com/users/tanacasino/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/tanacasino/subscriptions", "organizations_url": "https://api.github.com/users/tanacasino/orgs", "repos_url": "https://api.github.com/users/tanacasino/repos", "events_url": "https://api.github.com/users/tanacasino/events{/privacy}", "received_events_url": "https://api.github.com/users/tanacasino/received_events", "type": "User", "site_admin": false }, { "login": "shimamoto", .... } ]