Skip to content

feat: add issues and PRs breakdown to GitHub stats API#91

Merged
Gautam25Raj merged 1 commit into
VeriWorkly:masterfrom
d3vpool:feat/github-sync-stats-breakdown
May 24, 2026
Merged

feat: add issues and PRs breakdown to GitHub stats API#91
Gautam25Raj merged 1 commit into
VeriWorkly:masterfrom
d3vpool:feat/github-sync-stats-breakdown

Conversation

@d3vpool
Copy link
Copy Markdown
Contributor

@d3vpool d3vpool commented May 24, 2026

What this does

Extends the GitHub sync stats to separately track issues and pull requests
instead of treating them as a single combined count.

Changes

  • schema.prisma: Added two new fields to GitHubSync:
    • onlyIssueCount — count of items with kind = "issue"
    • prCount — count of items with kind = "pull-request"
  • githubService.ts: Replaced 3 separate COUNT queries with a single
    groupBy({ by: ["status", "kind"] }) query for efficiency, then derives all
    counts (todo/inProgress/done + issue/PR breakdown) in a single pass.
  • Stats API response now includes issues and pullRequests fields alongside
    the existing total, todo, inProgress, and done.

Migration

A Prisma migration is needed to add the two new columns (both default to 0).

Closes #61

Copy link
Copy Markdown
Collaborator

@Gautam25Raj Gautam25Raj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent work on this PR @d3vpool! 🚀

The implementation looks clean and well-structured, and everything works as expected. Thanks for the effort and attention to detail.

I’ll go ahead and merge this PR. Great contribution! 🎉

@Gautam25Raj Gautam25Raj added backend server-side logic api API-related changes or issues labels May 24, 2026
@Gautam25Raj Gautam25Raj merged commit 6749024 into VeriWorkly:master May 24, 2026
1 check failed
@d3vpool d3vpool deleted the feat/github-sync-stats-breakdown branch May 25, 2026 03:36
@d3vpool
Copy link
Copy Markdown
Contributor Author

d3vpool commented May 25, 2026

Thanks for the review and merge! Really appreciate the feedback and guidance. 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api API-related changes or issues backend server-side logic

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]: Include Issues and PRs breakdown in GitHub Stats API

2 participants