Skip to content

Instantly share code, notes, and snippets.

@gythialy
Created May 6, 2024 07:13
Show Gist options
  • Save gythialy/8611b34fbe6a10b45658efe703379b6c to your computer and use it in GitHub Desktop.
Save gythialy/8611b34fbe6a10b45658efe703379b6c to your computer and use it in GitHub Desktop.
Get repo information about user-contributed PR
gh api graphql --paginate -F login="user_name" -f query='
query userInfo($login: String!) {
user(login: $login) {
name
repositoriesContributedTo(contributionTypes: [PULL_REQUEST]) {
totalCount
}
contributionsCollection(
from: "2024-01-01T15:45:00.000Z"
to: "2024-12-30T15:45:00.000Z"
) {
totalRepositoriesWithContributedCommits
pullRequestContributionsByRepository(maxRepositories: 30) {
repository {
forkCount
nameWithOwner
url
stargazerCount
}
}
}
}
}
'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment