Skip to content
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

Add User Contribution Summary API #35

Merged
merged 4 commits into from
Dec 9, 2023
Merged

Add User Contribution Summary API #35

merged 4 commits into from
Dec 9, 2023

Conversation

samad-yar-khan
Copy link
Contributor

@samad-yar-khan samad-yar-khan commented Dec 9, 2023

Issue(s)

Acceptance Criteria fulfillment

  • PR Counts (Along with Repo Count)
  • Issue Count (Along with Repo Count)
  • Commits Count (Along with Repo Count)
  • Review Count (Along with Repo Count)

Proposed changes (including videos or screenshots)

  • Added single method fetchUserContributionSummaryMetrics that fetches all data needed for summary in a single query. this saves us multiple API calls.
  • Defined Types:
    • GithubContributionSummaryCollection : Describes data format
    • GraphQLContributionSummaryResponse: Describes Response format
  • Update Type name: GraphQLMetricsRespons to GraphQLContributionCalendarMetricsResponse
  • Update method name: fetchGitHubMetrics to fetchUserGitHubContributionCalendarMetrics

API GET /api/github/contribution_summary
Reponse:

{
"contributionSummary": {
"totalCommitContributions": 1967,
"totalIssueContributions": 20,
"totalPullRequestContributions": 503,
"totalPullRequestReviewContributions": 305,
"totalRepositoriesWithContributedPullRequests": 13,
"totalRepositoriesWithContributedIssues": 5,
"totalRepositoriesWithContributedPullRequestReviews": 5,
"totalRepositoriesWithContributedCommits": 14
}
}

@samad-yar-khan samad-yar-khan merged commit d142c80 into main Dec 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[New] Add BFF API to fetch User GH Summary
2 participants