|
1 | | -# smart-todo-action |
| 1 | +# 🧠 smart-todo-action |
| 2 | + |
| 3 | +A GitHub Action that scans your codebase for inline TODOs, FIXMEs, and BUG comments, and automatically creates GitHub Issues — with support for labels, metadata parsing, and semantic enrichment. |
| 4 | + |
| 5 | +--- |
| 6 | + |
| 7 | +## 🚀 Features |
| 8 | + |
| 9 | +- ✅ Detects `TODO`, `FIXME`, `BUG`, and `HACK` comments |
| 10 | +- ✅ Supports multiple languages: `.ts`, `.js`, `.py`, `.go`, `.html`, etc. |
| 11 | +- ✅ Extracts metadata like `priority`, `due`, etc. |
| 12 | +- ✅ Automatically labels issues based on type and metadata |
| 13 | +- ✅ Creates labels on the fly if they don't exist |
| 14 | + |
| 15 | +--- |
| 16 | + |
| 17 | +## ⚙️ Usage |
| 18 | + |
| 19 | +### 1. Add the Action to your workflow |
| 20 | + |
| 21 | +```yaml |
| 22 | +name: Smart TODO Tracker |
| 23 | + |
| 24 | +on: |
| 25 | + push: |
| 26 | + branches: [main] |
| 27 | + |
| 28 | +jobs: |
| 29 | + smart-todo: |
| 30 | + runs-on: ubuntu-latest |
| 31 | + permissions: |
| 32 | + issues: write |
| 33 | + |
| 34 | + steps: |
| 35 | + - uses: actions/checkout@v3 |
| 36 | + |
| 37 | + - name: Setup Node.js |
| 38 | + uses: actions/setup-node@v3 |
| 39 | + with: |
| 40 | + node-version: 20 |
| 41 | + |
| 42 | + - run: yarn install |
| 43 | + - run: yarn prepare |
| 44 | + |
| 45 | + - name: Run Smart TODO Action |
| 46 | + uses: ./ |
| 47 | + with: |
| 48 | + repo-token: ${{ secrets.GITHUB_TOKEN }} |
| 49 | +``` |
| 50 | +
|
| 51 | +## 📝 Example TODOs |
| 52 | +
|
| 53 | +```ts |
| 54 | +// TODO(priority=high, due=2025-06-01): Refactor this method for performance |
| 55 | +// FIXME: Handle null input properly |
| 56 | +// BUG: This causes a crash when file is empty |
| 57 | +``` |
| 58 | +
|
| 59 | +## 🏷️ Automatic Labels |
| 60 | +
|
| 61 | +Based on your TODO comment, the following labels will be applied: |
| 62 | +
|
| 63 | +| Tag | Label(s) | |
| 64 | +|--------|-----------------------------------------------| |
| 65 | +| TODO | `enhancement`, `priority:high`, `due:2025-06-01` | |
| 66 | +| FIXME | `bug` | |
| 67 | +| BUG | `bug` | |
| 68 | +| HACK | `technical-debt` | |
| 69 | + |
| 70 | +If a label like `priority:high` or `due:2025-06-01` doesn't exist, it will be automatically created. |
| 71 | + |
| 72 | +--- |
| 73 | + |
| 74 | +## 📌 Notes |
| 75 | + |
| 76 | +- Max **5 issues** are created per run to avoid rate limiting |
| 77 | +- **Duplicate detection** is not yet implemented _(coming soon)_ |
| 78 | +- All labels are **auto-created with default colors** if missing |
| 79 | + |
| 80 | +--- |
| 81 | + |
| 82 | +## 📤 Coming Soon |
| 83 | + |
| 84 | +- ✅ Issue deduplication |
| 85 | +- ✅ Custom templates for issue bodies |
| 86 | +- ✅ CLI usage outside GitHub |
| 87 | +- ✅ LLM-powered summarization and classification |
| 88 | +- ✅ Support for more languages and comment styles |
| 89 | +- ✅ Customizable label creation and management |
| 90 | +- ✅ Integration with project management tools (e.g., Jira, Trello) |
| 91 | +- ✅ Support for multiple repositories in a single run |
| 92 | +- ✅ Rate limiting and error handling improvements |
| 93 | +- ✅ Customizable issue creation frequency (e.g., daily, weekly) |
| 94 | +- ✅ Support for user-defined metadata tags |
| 95 | +- ✅ Customizable issue assignment (e.g., to specific users or teams) |
| 96 | +- ✅ Support for issue templates and custom fields |
| 97 | +- ✅ Integration with CI/CD pipelines for automated issue tracking |
| 98 | +- ✅ Support for issue comments and discussions |
| 99 | +- ✅ Customizable notification settings (e.g., email, Slack) |
| 100 | +- ✅ Support for issue closing and resolution tracking |
| 101 | +- ✅ Customizable issue lifecycle management (e.g., open, in progress, closed) |
0 commit comments