Skip to content

feat: Automated Contribution Digest - #582

Merged
PRODHOSH merged 2 commits into
PRODHOSH:mainfrom
Aditya8369:feat/Automated-Contribution-Digest
Jul 25, 2026
Merged

feat: Automated Contribution Digest#582
PRODHOSH merged 2 commits into
PRODHOSH:mainfrom
Aditya8369:feat/Automated-Contribution-Digest

Conversation

@Aditya8369

@Aditya8369 Aditya8369 commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Summary

The Automated Contribution Digest feature has been fully built and verified!

Related Issue

Closes #538

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Refactor
  • Chore / dependency update

Changes Made

  • Created 20260725000001_add_profile_digests.sql to store and cache weekly/monthly digest data in Supabase.
  • Created digest.ts with getContributionDigest(...) for weekly/monthly calculations (PRs merged, issues resolved, repos starred, orgs joined, achievements) and generateDigestRssXml(...) for RSS 2.0 XML feeds.

Checklist

  • I was assigned to the issue before opening this PR
  • My branch is up to date with main
  • Code works locally and I have tested it
  • No console.log left in src/
  • If schema changed — both schema.sql and a new migration file are included
  • If this is a UI change — I read DESIGN.md and followed the design system (colors, spacing, typography, components)
  • Docs updated if needed
  • PR title follows Conventional Commits format (feat:, fix:, docs:, etc.)
  • This PR description is written in my own words

Summary by CodeRabbit

  • New Features

    • Added weekly and monthly contribution digest pages with contribution statistics, achievements, activity timelines, and top contributions.
    • Added options to download the digest as an image, copy its link, share it on X, and access an RSS feed.
    • Added API endpoints for retrieving digest data and RSS feeds.
    • Added digest caching to improve loading performance.
  • Tests

    • Added coverage for digest date ranges and RSS feed generation.

@github-actions

Copy link
Copy Markdown
Contributor

Welcome to OSSfolio, @Aditya8369! 🎉

Thank you for opening this pull request and contributing to the open-source community! 🚀

To ensure a smooth review process, please make sure you have:

  • Checked that your changes work locally and compile cleanly.
  • Followed the guidelines outlined in CONTRIBUTING.md.
  • Linked your PR to an open issue (e.g. Closes #ISSUE_NUMBER).

We will review your PR as soon as possible. Happy coding! 💻✨

@coderabbitai

coderabbitai Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 7798eafb-bda9-4b8c-9cd7-923fb87e0fe9

📥 Commits

Reviewing files that changed from the base of the PR and between 90f7f7d and 5d29029.

📒 Files selected for processing (7)
  • src/app/api/[username]/digest/feed/route.ts
  • src/app/api/[username]/digest/route.ts
  • src/app/digest/[username]/page.tsx
  • src/components/digest/ContributionDigest.tsx
  • src/lib/__tests__/digest.test.ts
  • src/lib/digest.ts
  • supabase/migrations/20260725000001_add_profile_digests.sql

📝 Walkthrough

Walkthrough

Adds weekly and monthly contribution digest generation with Supabase caching, JSON and RSS APIs, a rendered digest page, and an interactive exportable client card.

Changes

Contribution digest

Layer / File(s) Summary
Digest data and caching
src/lib/digest.ts, supabase/migrations/..., src/lib/__tests__/digest.test.ts
Defines digest data models, computes date ranges and contribution activity, caches snapshots in profile_digests, generates RSS XML, and tests date and RSS behavior.
Digest and RSS API routes
src/app/api/[username]/digest/...
Adds JSON and RSS GET handlers with period parsing, username validation, error responses, XML headers, and caching headers.
Digest page and interactive card
src/app/digest/[username]/page.tsx, src/components/digest/ContributionDigest.tsx
Adds page metadata and rendering plus period switching, PNG export, sharing, link copying, RSS linking, statistics, achievements, contributions, and timeline activity display.

Estimated code review effort: 4 (Complex) | ~45 minutes

Suggested labels: enhancement, UI

Suggested reviewers: prodhosh

Poem

I’m a rabbit with a digest to share,
Weekly carrots and monthly flair.
RSS hops through the feed so bright,
Cards bloom into PNG delight.
Contributions twinkle in a timeline row—
Hop, hop, ship, and watch it grow!

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added frontend Related to UI / Next.js backend API / Database / Server UI Visual / design changes labels Jul 25, 2026
@PRODHOSH
PRODHOSH self-requested a review July 25, 2026 17:43
@PRODHOSH PRODHOSH added ELUSOC ELUSOC project submission completed VETERAN Advanced — 50 pts labels Jul 25, 2026
@github-actions github-actions Bot removed the UI Visual / design changes label Jul 25, 2026
@PRODHOSH
PRODHOSH merged commit b7c1d3a into PRODHOSH:main Jul 25, 2026
5 of 8 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

🎉 Your PR just got merged, @Aditya8369 — thank you for contributing to OSSfolio!

Your work is now part of the project. Here's what to do next:

  • ⭐ If you haven't already, consider giving the repo a star — it helps us grow.
  • 📢 Share your contribution on LinkedIn, Twitter, or wherever you hang out. You shipped open source!
  • 🔍 Browse other open issues if you want to keep contributing.

We really appreciate you taking the time. See you in the next PR! 🚀

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

Labels

backend API / Database / Server completed ELUSOC ELUSOC project submission frontend Related to UI / Next.js VETERAN Advanced — 50 pts

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] Automated Contribution Digest

2 participants