Can't access the contributors of a repository



I’m trying to access the contributors of a repository and obtain their permission status on that repository. I can’t seem to find a way to do this simply with the GraphQL API. Am I missing something?

The data that I would like to have exposed:

A list collaborators as Users with their respective permission level.

Related existing REST API resource, if applicable:

A description of how you intend on using the data:

I’m currently using this data to check whether users found in an OWNERS file-like format are contributors, and whether they need to be granted read privilege or can be assigned as reviewers right away.

Contributors of a repository

Hi @tobie,

I don’t believe that there’s currently a way to access repository contributors from the GraphQL API.

If you’d like, you can turn this topic into a “schema request”. Please just tag this topic with schema-request and provide:

  • The data that you would like to have exposed.
  • A link to the existing REST API resource, if applicable.
  • A description of how you intend on using the data.


Done. (Edited the initial post).


Thanks @tobie, I’ve added an internal issue to track this schema request. I’ll update you here when we have something to update.


I’m quite interested in this as well. I need to be able to determine if a review left by a user “counts” toward the branch protection requirement. Only users that have write access can meet branch protection requirement of a passing review.


+1 I would love this


Hey @github-staff , any updates?


We’ve just shipped support for a RepositoryCollaboratorConnection on Repository. You can now use it in your queries. Here is an example:

query {
  repository(owner: "peek", name: "peek") {
    collaborators(first: 10, affiliation: ALL) {
      edges {
        node {
  rateLimit {

Note: You must have push access to the repository before you can view the collaborators, otherwise it will return a forbidden error.

Thank you for your patience and for opening this thread @tobie!

Contributions by contributors in a repository

Sweet! Thanks.


As far as I now understood there is still not a way get the contributors of a repo with GraphQL?
Because for the collaborators you need to have push access.

For the v3 call there is no such “limitation”:

"errors": [
    "message": "Must have push access to view repository collaborators.",
    "type": "FORBIDDEN",
    "path": [
    "locations": [
        "line": 4,
        "column": 5

Also found maybe also my answer already here


Hi @CodeBrauer! The collaborators connection does mirror the collaborators REST API in that both require push access to the repository.

$ curl -H "Authorization: token $GITHUB_TOKEN"
  "message": "Must have push access to view repository collaborators.",
  "documentation_url": ""

We are working on exposing contributors in GraphQL without needing push access, similar to the contributors endpoint in the REST API. We will follow up when there is progress.


Hi, well ok - But for the moment I need the contributors in GraphQL, also for repos that I don’t have push access. So I have to take a workaround with a combination of the REST API and GraphQL.