Skip to content

Repository files navigation

GitHub PR Comment Counter

A Chrome extension that counts open and closed review comments on GitHub Pull Requests and copies all open comments to clipboard with full context.

Features

  • 📊 Count Comments: Displays the number of open and closed review comments
  • 📋 Copy to Clipboard: Copies all open comments with file context and diff snippets
  • 🔄 Auto-scroll: Automatically scrolls through the PR to load all lazy-loaded comments
  • 🎨 Progress Indicator: Shows real-time progress during comment collection
  • 🤖 AI-Aware: Filters out boilerplate text from Greptile and Macroscope AI reviewers

Installation

  1. Clone or download this repository

  2. Load the extension in Chrome:

    • Open Chrome and navigate to chrome://extensions/
    • Enable "Developer mode" (toggle in top-right)
    • Click "Load unpacked"
    • Select the pr-copilot folder

Usage

  1. Navigate to any GitHub Pull Request page (e.g., https://github.com/user/repo/pull/123)
  2. Click the extension icon in your Chrome toolbar
  3. View the count of open and closed comments
  4. Click "Copy Open Comments" to:
    • Auto-scroll through the entire PR
    • Collect all open comments
    • Copy them to clipboard in a formatted template

Output Format

The copied text follows this format:

Is each one of them is required? Critically debate about it.
Don't code yet ask for clarity and state the opinion.
Refer to the changes made recently to answer about the following comments

---
Comment: [Comment text with boilerplate removed]
Context:
  File: [file path]
  Lines: [line numbers]
  Diff:
    [diff snippet showing changes]
---

Technical Details

  • Manifest Version: 3
  • Permissions: activeTab, scripting
  • Supported Sites: GitHub PR pages only
  • Boilerplate Filtering: Removes common AI reviewer prompts

Files

  • manifest.json - Extension configuration
  • popup.html - Extension popup UI
  • popup.css - Styling with GitHub-inspired dark theme
  • popup.js - Popup logic and messaging
  • content.js - Content script for DOM parsing and comment extraction

Development

The extension uses:

  • Chrome Extension Manifest V3
  • Vanilla JavaScript (no frameworks)
  • CSS with glassmorphism and gradient effects
  • Chrome messaging API for popup ↔ content script communication

Troubleshooting

Comments not being detected?

  • Make sure you're on the "Conversation" tab of a PR
  • Try scrolling manually first to ensure comments are loaded
  • Check the browser console for any errors

Copy not working?

  • Ensure the extension has permission to access the current tab
  • Check that you're on a GitHub PR page

License

MIT

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages