If you're anything like me, you have a habit of leaving TODOs, FIXMEs, and HACKs in your code. But keeping track of them can be a pain. That's where issue-syncer comes in!
issue-syncer is a tool that automatically synchronizes TODO comments in your code with GitHub issues. It scans your codebase for special comments (like TODO, FIXME, or HACK), and creates, updates, or closes GitHub issues to track them.
- Scans codebases for TODO, FIXME, and HACK comments
- Automatically creates GitHub issues for new comments
- Updates existing issues when comments change
- Closes issues when comments are removed
- Supports multiple programming languages
- Ignores specified directories (like node_modules, .git)
- Customizable search patterns and directories to skip
go install github.com/alexdor/issue-syncer@latestOr clone the repository and build manually:
git clone https://github.com/alexdor/issue-syncer.git
cd issue-syncer
go buildname: Sync TODOs
on:
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
issues: write
contents: read
jobs:
todo-sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Sync TODOs with Issues
uses: alexdor/[email protected] # x-release-please-version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}You can also run issue-syncer directly from the command line. Here’s how to use it:
issue-syncer [flags]For GitHub integration:
export GITHUB_TOKEN=your_github_token
export GITHUB_REPOSITORY=<username>/<repository>-p, --path: Path to the folder to scan (default: ".")-w, --words: Words to look for in comments (default: ["FIXME", "TODO", "HACK"])-d, --dirs-to-skip: Directories to skip (default: [".git", "node_modules", etc.])-g, --use-gitignore: Whether to use gitignore for skipping files (default: true)-s, --storer: Storer to use (default: "github")
Scan current directory with default settings:
issue-syncerScan a specific directory with custom comment markers:
issue-syncer --path ./src --words "TODO,FIXME,NOTE"issue-syncer supports comments in many programming languages including:
- Go
- Python
- JavaScript/TypeScript
- Java
- C/C++
- Ruby
- PHP
- Rust
- HTML/CSS
- Shell scripts
- And many more!
- The tool scans your codebase for specified comment patterns
- For each comment found, it creates or updates a GitHub issue
- The issue title is derived from the comment text
- The issue body contains the file path, line number, and full comment text
- Issues are tagged with "issue-syncer" and "auto-generated" labels
- When a comment is removed from code, the corresponding issue is closed
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the LICENSE included in the repository.