Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Copilot Lvl 2
Message 1 of 2

APIv4 feature request: allow contributionsCollection to include private contributions

Solved! Go to Solution.

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 Reply
Solution
Community Manager
Message 2 of 2

Re: APIv4 feature request: allow contributionsCollection to include private contributions

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.


Best,
AndreaG

Mark helpful posts with Accept as Solution to help other users locate important info. Don't forget to give Kudos for great content!