I have a rails app and need to check if a specific user is a collaborator on a Github project, and also the list of GitHub projects a specific user can commit to. This is to verify if they can commit to the project (e.g., are admin or have push rights), and to help them pick off the projects they can commit to.
I tried using the rails gem "omniauth-github" with Github API[1], but it appears one needs to be a repo owner to verify a user's collaborator status.
GET /repos/:owner/:repo/collaborators/:username
Can you please recommend how to check if a user is a collaborator on a project using Github API and omniauth-github gem? Ideally, a user would authorize the app to obtain a list of repos where that user is an owner/collaborator, without also requiring the user to authorize the app to make changes (I don't need such powerful privileges).
Thanks
[1] https://developer.github.com/v3/repos/collaborators/#get