-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to query for commits in a given Repository #62
Comments
@SashaCollins Did you figured out how to do it ? |
Having the same message on a different query: |
I got this working with the following: type LatestContributions struct {
User struct {
Repositories struct {
TotalCount int
Nodes []struct {
Name string
IsPrivate bool
PushedAt githubv4.DateTime
DefaultBranchRef struct {
Name string
Target struct {
SpreadCommits struct {
History struct {
TotalCount int
} `graphql:"history(since:"2021-09-19T23:05:23Z")"`
} `graphql:"... on Commit"`
}
}
}
} `graphql:"repositories(first: 10, orderBy: {field: PUSHED_AT, direction: DESC})"`
} `graphql:"user(login: $login)"`
} The missing bit in the top post is the stub/placeholder |
@chetan 's example helped solve my issue with error
The solution was to create the
|
Hello,
I'm trying to convert this query into a struct:
I got this from https://stackoverflow.com/questions/15919539/github-api-how-to-efficiently-find-the-number-of-commits-for-a-repository
I tested it on the Github explorer just to be safe and its working as it should.
What I'm trying to do is to get the "TotalCount" of commits per contributor to a specific Repository.
I'm not really sure how I'm supposed to do it exactly.
I already got this:
But I get this error message:
However I can't seem to find any useful documentation.
Can anybody tell me what I'm doing wrong please?
The text was updated successfully, but these errors were encountered: