Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

✏️ comment-sonar

A GitHub Action that detects TODO and FIXME comments in your codebase and creates or updates a GitHub Issue to help you keep track of them.

Built with Deno, designed to be lightweight, configurable, and CI-friendly.

🚀 Features

  • Detects TODO: and FIXME: comments in your source files
  • Creates or updates a single GitHub Issue to summarize findings
  • Adds clickable links to exact file and line number
  • Supports glob-based include/exclude path configuration
  • Runs standalone as a GitHub Action — no setup required

🔧 Inputs

Name Required Description
github_token No GitHub token for authentication. Defaults to ${{ github.token }}
github_repository No Repository to operate on. Defaults to ${{ github.repository }}
sonar_includes No Glob patterns to include. Default: '**/*'
sonar_excludes No Glob patterns to exclude. Default: ''
issue_title No Title of the GitHub Issue. Default: :pushpin: TODO/FIXME List
issue_label No Label to apply to the GitHub Issue. Default: TODO

🧪 Example Usage

name: Detect TODO Comments

on:
  push:
    branches: [main]

jobs:
  scan-todo:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Run comment-sonar
        uses: rn404/comment-sonar@v1
        with:
          sonar_includes: |
            src/**
            scripts/**
          sonar_excludes: |
            node_modules/
            dist/

🔖 Output

The action generates or updates a GitHub Issue like this:

📌 TODO/FIXME List

🔨 Requirements

  • The workflow must set permissions with issues: write to allow creating/updating issues.
  • GITHUB_TOKEN is used to authenticate with the GitHub API

🧵 Development

To run locally:

deno task precommit
deno task run

📘 License

MIT — see LICENSE

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages