APIv4 feature request: allow contributionsCollection to include private contributions

The GraphQL API contains a contributionsCollection endpoint which is excellent for writing work reports:

query {
  viewer {
    contributionsCollection {
      pullRequestContributionsByRepository {
        repository {
          nameWithOwner
        }
        contributions {
          nodes {
            pullRequest {
              createdAt
              title
              url
            }
          }
        }
      }
}
}
}
 

To my knowlege, it is impossible to get this query to include private contributions, even when appropriately authenticated (although I can do things like counting the number of contributions that can’t be shown). This is corroborated by a recent answer on this forum. I feel that this would a really valuable feature to add, if possible.

1 Like

Hi @craigfe,

Thank you for being here! As you mentioned this is not possible on v4 yet, I’ll be sure to pass it along to our team for consideration, in the meanwhile  you can use the REST API which allows you to list commits for a specific user:

https://developer.github.com/v3/repos/commits/#list-commits-on-a-repository

Sorry I didn’t have better news, but please rest assured your feedback is correct hands.