简体   繁体   中英

List all contributors to a private github repository using github api

I know it is possible to do this for a public repository (GET /repos/:owner/:repo/contributors) but I am wondering if there is a way to do this for private repositories that an authenticated user using my app is a member of. Also, I am using octokit.rb gem so any answers in that context are much appreciated.

if there is a way to do this for private repositories that an authenticated user using my app is a member of.

Create an Octokit client with this authenticated user:

client = Octokit::Client.new(access_token: authenticated_use.token)

Then get list of collaborators from a repository:

client.collaborators("octokit/octokit.rb")

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM