1

I have a GitHub app that is authorized to access data from my workplace's private repository. I use the GitHub GraphQL API to search for each user's recent pull requests.

The pull request query works great except in the case of one user who has made their activity private.

Here's a basic version of the query:

query PRs($searchQuery: String!) {
  search(query: $searchQuery, type: ISSUE, last: 100) {
    issueCount
  }
}

And here's the search query:

{
  "searchQuery": "author:<user_login> type:pr merged:2022-09-25..2022-10-30"
}

I can get correct results from this search query with every other user in the org via GraphQL. I can see correct results for this user when I enter that query into the Pull Request repo search bar in the GH UI.

I can't find any documentation on GitHub's site that says they won't return activity via the GraphQL API. Can anyone confirm that's the case?

It seems weird that GitHub would interpret "private activity" as meaning that your own company can't retrieve it.

marie2048
  • 11
  • 1
  • I'm having a similar issue, where I'm requesting all the closed PR's for an org repo and its returning 25 when there are over 300 of them. I dont think its private activity being set, nobody has that enabled for my team. Did you find anything out since asking this question? – StingyJack Nov 21 '22 at 03:29

0 Answers0