Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 26, 2025

🎉 GitHub Comment Leaderboard

Tracks and displays users with the most comments on GitHub issues, PRs, and discussions. Starts with BLT repo, expandable to all project repos.

✅ Core Implementation

  • GitHubComment Model: Stores comment data with relationships to UserProfile, Contributor, and Repo
  • Management Command: fetch_github_comments fetches comment data from GitHub API with rate limiting and multi-repo support
  • Leaderboard View: Added GitHub comment section to /leaderboard/ showing top 10 commenters
  • REST API: New endpoint /api/v1/leaderboard/?leaderboard_type=github_comments
  • Admin Interface: CRUD operations with search, filtering, and date hierarchy

📊 Database Migration

Migration 0260_add_github_comment_leaderboard.py creates GitHubComment table with indexes on:

  • comment_id
  • (user_profile, created_at)
  • (contributor, created_at)

Dependencies: 0259_add_search_history

✅ Features

  • ✓ Shows users with most comments on issues, PRs, discussions
  • ✓ Starts with BLT repo (OWASP-BLT/BLT)
  • ✓ Expandable to all repos via --all-repos flag
  • ✓ Professional UI with Tailwind styling
  • ✓ API access for programmatic use
  • ✓ Full test coverage
  • ✓ No security vulnerabilities

🚀 Usage

# Fetch comments for BLT repository
python manage.py fetch_github_comments

# Expand to all repositories in database
python manage.py fetch_github_comments --all-repos

# API access
GET /api/v1/leaderboard/?leaderboard_type=github_comments

🔧 Technical Details

  • Comments linked to UserProfile by GitHub username match, falls back to Contributor by github_id
  • Rate limited: 0.5s between issues/PRs, 0.3s between comment pages
  • Responsive UI with user avatars, profile links, and comment counts
  • 8 tests covering model relationships, leaderboard queries, and ordering

Status: ✅ READY FOR REVIEW AND MERGE

Original prompt

This section details on the original issue you should resolve

<issue_title>Have a GitHub comment leaderboard</issue_title>
<issue_description>Show users with the most comments on issues, PRs, discussions start with the BLT repo then expand to all repos in the projects section</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 26, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


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

Copilot AI changed the title [WIP] Add GitHub comment leaderboard for users Add GitHub comment leaderboard tracking Oct 26, 2025
Copilot AI requested a review from DonnieBLT October 26, 2025 06:52
@mdkaifansari04
Copy link
Contributor

@DonnieBLT Would like to work on this issue

@github-actions
Copy link
Contributor

Hello @mdkaifansari04! You've been assigned to OWASP-BLT/BLT issue #4663. You have 24 hours to complete a pull request.

@github-actions
Copy link
Contributor

⏰ This issue has been automatically unassigned from DonnieBLT due to 24 hours of inactivity. The issue is now available for anyone to work on again.

@github-actions github-actions bot added files-changed: 12 PR changes 12 files unresolved-conversations: 0 PR has 0 unresolved conversations labels Nov 16, 2025
@DonnieBLT DonnieBLT marked this pull request as ready for review November 16, 2025 03:37
@DonnieBLT DonnieBLT added the d15 label Nov 16, 2025
@github-actions github-actions bot added last-active: 0d PR last updated 0 days ago last-active: 1d PR last updated 1 day ago and removed last-active: 1d PR last updated 1 day ago last-active: 0d PR last updated 0 days ago labels Dec 13, 2025
@github-actions github-actions bot added last-active: 0d PR last updated 0 days ago last-active: 1d PR last updated 1 day ago and removed last-active: 1d PR last updated 1 day ago last-active: 0d PR last updated 0 days ago labels Dec 20, 2025
@github-actions github-actions bot added last-active: 1d PR last updated 1 day ago last-active: 2d PR last updated 2 days ago last-active: 0d PR last updated 0 days ago and removed last-active: 0d PR last updated 0 days ago last-active: 1d PR last updated 1 day ago last-active: 2d PR last updated 2 days ago labels Dec 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

checks: all-approved All workflow checks are approved files-changed: 8 PR changes 8 files last-active: 2d PR last updated 2 days ago migrations PR contains database migration files pre-commit: passed Pre-commit checks passed regenerate-migrations reviewed tests: failed Django tests failed unresolved-conversations: 0 PR has 0 unresolved conversations update-migrations

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

Have a GitHub comment leaderboard

3 participants