gh-pr-todo
A GitHub CLI extension that extracts TODO comments from pull request diffs, helping you track action items and reminders in your code changes.
β¨ Features
- π Smart Detection: Finds TODO, FIXME, HACK, NOTE, XXX, and BUG comments
- π¨ Beautiful Output: Colorized terminal output with loading indicators
- π Multiple Formats: Supports various comment styles (
//, #, <!--, ;, /*, markdown lists)
- β‘ Fast: Efficient diff parsing with GitHub CLI integration
- π― PR-Focused: Only shows comments from your current changes
π Installation
gh ext install Suree33/gh-pr-todo
Prerequisites:
- GitHub CLI installed and authenticated
- Go 1.20.0 or later
π Usage
Navigate to your repository with an open pull request and run:
gh pr-todo
Example Output
β Fetching PR diff...
Found 3 TODO comment(s)
* src/api/users.go:42
// TODO: Add input validation for email format
* components/Header.tsx:15
// FIXME: Memory leak in event listener cleanup
* docs/setup.md:8
<!-- NOTE: Update this section after v2.0 release -->
The tool recognizes TODO-style comments in various formats:
| Format |
Example |
| C-style |
// TODO: Fix this bug |
| C-style block |
/* HACK: Quick fix for demo */ |
| Shell/Python |
# FIXME: Optimization needed |
| HTML/XML |
<!-- NOTE: Review this section --> |
| Assembly/Config |
; XXX: Temporary workaround |
ποΈ Supported Keywords
TODO
FIXME
HACK
NOTE
XXX
BUG
π οΈ Development
Building from Source
git clone https://github.com/Suree33/gh-pr-todo.git
cd gh-pr-todo
go build -o gh-pr-todo main.go
Project Structure
βββ main.go # CLI entry point
βββ internal/
β βββ parser.go # Diff parsing logic
βββ pkg/
β βββ types/
β βββ todo.go # TODO type definitions
βββ scripts/ # Build scripts (if any)
Dependencies
π€ Contributing
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature)
- Commit your changes (
git commit -m 'Add amazing feature')
- Push to the branch (
git push origin feature/amazing-feature)
- Open a Pull Request
π License
This project is licensed under the terms specified in the LICENSE file.
π Issues & Feature Requests
Found a bug or have a feature idea? Please open an issue on GitHub.