[feature_request] Add date selector arguments to GraphQL repositoriesContributedTo object #39589
Unanswered
rickstaa
asked this question in
API and Webhooks
Replies: 1 comment 4 replies
-
query userInfo($login: String!) {
user(login: $login) {
name
repositoriesContributedTo(
from:"2020-11-20T15:45:00.000Z", to:"2021-11-20T15:45:00.000Z",
contributionTypes: [COMMIT, ISSUE, PULL_REQUEST, REPOSITORY]
) {
totalCount
}
}
}running this code gives a error |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Select Topic Area
Product Feedback
Body
I'm trying to get the total number of repositories a user has contributed to since GitHub launched in 2008. My first impression was that I could get this number from GraphQLs
repositoriesContributedTo.totalCountobject. As explained in https://github.com/orgs/community/discussions/24350 and the GraphQL documentation, however, this object seems to give the results for the last year. Since this object doesn't have afromandtoargument, I could not find an easy way to loop through all years to get the totalrepositoriesContributedTo. For my use case, it would be fantastic if you could change the period of therepositoriesContributedTo.totalCountobject from GitHub's onset to the current time. Alternatively, adding the date selector arguments (i.e.fromandto) to therepositoriesContributedTo.totalCountobject would significantly improve the user experience.Current behaviour
The only way I currently found for retrieving the total number of PUBLIC repositories a user has contributed to is looping through all years in the
contributionsCollection.totalRepositoriesWithContributedCommitsobject via thefromandtoarguments.{"login": "rickstaa"}This, however, also includes the repositories a user owns, so I still need to filter these repositories out, which costs additional GraphQL points and requires unnecessary code.
New behaviour
It would be great if you could provide the
repositoriesContributedTodirectly like in thefollowersobject:{"login": "rickstaa"}Or add the date selector arguments to the
repositoriesContributedToobject:{"login": "rickstaa"}Beta Was this translation helpful? Give feedback.
All reactions