{"id":19858691,"url":"https://github.com/ribtoks/tdg-github-action","last_synced_at":"2026-01-06T20:28:05.868Z","repository":{"id":44883656,"uuid":"264255061","full_name":"ribtoks/tdg-github-action","owner":"ribtoks","description":"GitHub action for project management using TODO comments","archived":false,"fork":false,"pushed_at":"2025-04-01T19:23:56.000Z","size":2051,"stargazers_count":60,"open_issues_count":8,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-01T20:27:20.387Z","etag":null,"topics":["github-action","github-action-docker","github-issues","golang","project-management","todo"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ribtoks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-15T17:20:35.000Z","updated_at":"2025-01-29T13:50:28.000Z","dependencies_parsed_at":"2023-11-12T08:27:29.363Z","dependency_job_id":"3c99ab99-7774-48a8-bddc-b408d3a5e31d","html_url":"https://github.com/ribtoks/tdg-github-action","commit_stats":{"total_commits":75,"total_committers":4,"mean_commits":18.75,"dds":"0.33333333333333337","last_synced_commit":"56c7b2df27c25af36d3f10ff19ae4efdef713156"},"previous_names":[],"tags_count":20,"template":false,"template_full_name":"jacobtomlinson/go-container-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ribtoks%2Ftdg-github-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ribtoks%2Ftdg-github-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ribtoks%2Ftdg-github-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ribtoks%2Ftdg-github-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ribtoks","download_url":"https://codeload.github.com/ribtoks/tdg-github-action/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251972474,"owners_count":21673612,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["github-action","github-action-docker","github-issues","golang","project-management","todo"],"created_at":"2024-11-12T14:24:15.448Z","updated_at":"2026-01-06T20:28:05.808Z","avatar_url":"https://github.com/ribtoks.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# Turn your TODO comments into GitHub Issues\r\n\r\n[![Build](https://github.com/ribtoks/tdg-github-action/workflows/Build/badge.svg)](https://github.com/ribtoks/tdg-github-action/actions)\r\n[![Integration Test](https://github.com/ribtoks/tdg-github-action/workflows/Integration%20Test/badge.svg)](https://github.com/ribtoks/tdg-github-action/actions)\r\n\r\nGitHub Action that will manage issues based on `TODO`/`BUG`/`FIXME`/`HACK` comments in the source code. Optionally issues are added to a Project Column that you specify. Source code is parsed using [tdg](https://gitlab.com/ribtoks/tdg) which supports comments for almost all existing languages.\r\n\r\nWhen a new todo comment is added, a new issue is created. When this comment is removed on the branch it was added, the corresponding issue is closed. Each issue is added with a special label so you can build more automation on top of it.\r\n\r\n## Screenshot\r\n\r\n![TDG result](screenshot.png \"Example of created issue\")\r\n\r\n## Usage\r\n\r\nCreate a workflow file in your `.github/workflows/` directory with the following contents:\r\n\r\n### Basic example\r\n\r\n```yaml\r\nname: TODO workflow\r\non: [push, pull_request]\r\njobs:\r\n  build:\r\n    runs-on: ubuntu-latest\r\n    steps:\r\n    - uses: actions/checkout@master\r\n    - name: Run tdg-github-action\r\n      uses: ribtoks/tdg-github-action@master\r\n      with:\r\n        TOKEN: ${{ secrets.GITHUB_TOKEN }}\r\n        REPO: ${{ github.repository }}\r\n        SHA: ${{ github.sha }}\r\n        REF: ${{ github.ref }}\r\n```\r\n\r\n\u003e **NOTE:** Please note that currently GitHub has 5000 requests per hour limit so if you are running it on a fresh repository and you have lots of todos in comments, you may hit this limit.\r\n\r\nYou can use this action together with [parent issue updater](https://github.com/ribtoks/parent-issue-update) in order to automatically keep track of child TODO items in parent issues. For that you need to use `issue=123` extension in the TODO comment - see example below.\r\n\r\n### Inputs\r\n\r\n| Input | Description |\r\n|---|---|\r\n| `REPO`  | Repository name in the format of `owner/repo` (required)   |\r\n| `ISSUE_REPO`  | Repository to create issues in (if empty, `REPO` is used)   |\r\n| `TOKEN`  | Github [token](#security-token) used to create or close issues (required)  |\r\n| `REF`  | Git ref: branch or pull request (required)|\r\n| `SHA`  | SHA-1 value of the commit (required) |\r\n| `ROOT`  | Source code root (defaults to `.`) |\r\n| `LABEL`  | Label to add to the new issues (defaults to `todo comment`) |\r\n| `EXTENDED_LABELS`  | Add additional labels to mark branch, code language, issue type and estimate |\r\n| `CLOSE_ON_SAME_BRANCH`  | Close issues only if they are missing from the same branch as they were created on (by default) |\r\n| `PROJECT_COLUMN_ID`  | Automatically create a project card in this column for new issue (none by default) |\r\n| `INCLUDE_PATTERN`  | Regex to include source code files (includes all by default) |\r\n| `EXCLUDE_PATTERN`  | Regex to exclude source code files (excludes none by default) |\r\n| `MIN_WORDS`  | Minimum number of words in the comment to become an issue (defaults to `3`) |\r\n| `MIN_CHARACTERS`  | Minimum number of characters in the comment to become an issue (defaults to `30`) |\r\n| `DRY_RUN`  | Do not open or close real issues (used for debugging) |\r\n| `ADD_LIMIT`  | Upper cap on the number of issues to create (defaults to `0` - unlimited) |\r\n| `CLOSE_LIMIT`  | Upper cap on the number of issues to close (defaults to `0` - unlimited) |\r\n| `COMMENT_ON_ISSUES` | Leave a comment in which commit the issue was closed (defaults to `0` - do not comment) |\r\n| `CONCURRENCY` | How many files to process in parallel (defaults to `128`) |\r\n| `ASSIGN_FROM_BLAME` | Get the author of the comment via git API from the commit hash of the comment and assign to the issue created (defaults to `0` - do not use) |\r\n\r\n\u003e **NOTE:** Keep in mind that you have to escape slashes in regex patterns when putting them to yaml\r\n\r\nFlag values like `CLOSE_ON_SAME_BRANCH` or `DRY_RUN` use values `1`/`true`/`y` as ON switch.\r\n\r\nIn order to get a column ID, you can go to your project and press \"Copy column link\" in the column 3 dots menu. ID is the last part of the URL `https://github.com/owner/repo/projects/5#column-823438` (ID would be `823438`).\r\n\r\nIn case you are disabling `EXTENDED_LABELS`, then `CLOSE_ON_SAME_BRANCH` logic will be broken since there will be no knowledge on which branch the issue was created (for new issues), effectively making it disabled.\r\n\r\n### Security (token)\r\n\r\nYou can of course use a private token or, if you want to use a default `GITHUB_TOKEN`, available for CI, you need to add read and write permissions in the _Repository -\u003e Settings -\u003e Actions -\u003e General -\u003e Workflow permissions_ select `\"Read and write permissions\"`.\r\n\r\n### Outputs\r\n\r\n| Output                                             | Description                                        |\r\n|------------------------------------------------------|-----------------------------------------------|\r\n| `scannedIssues`  | Equals to `1` if completed successfully    |\r\n\r\n## Examples\r\n\r\n### Workflow\r\n\r\n```yaml\r\nname: TDG\r\non: [push, pull_request]\r\njobs:\r\n  build:\r\n    runs-on: ubuntu-latest\r\n    steps:\r\n    - uses: actions/checkout@master\r\n    - name: Run tdg-github-action\r\n      uses: ribtoks/tdg-github-action@master\r\n      with:\r\n        TOKEN: ${{ secrets.GITHUB_TOKEN }}\r\n        REPO: ${{ github.repository }}\r\n        SHA: ${{ github.sha }}\r\n        REF: ${{ github.ref }}\r\n        LABEL: \"my label\"\r\n        MIN_WORDS: 3\r\n        MIN_CHARACTERS: 40\r\n        ADD_LIMIT: 1\r\n        CLOSE_LIMIT: 1\r\n        ROOT: \"src\"\r\n        PROJECT_COLUMN_ID: 824533\r\n        INCLUDE_PATTERN: \"\\\\.(cpp|h)$\"\r\n```\r\n\r\nNote escaped regex.\r\n\r\nIf you want to only process TODO comments from `master` branch, modify the workflow `on` section like this:\r\n\r\n```yaml\r\non:\r\n  # only for the master branch\r\n  push:\r\n    branches:\r\n    - master\r\n```\r\n\r\n### TODO comments\r\n\r\nComments are parsed using [tdg](https://gitlab.com/ribtoks/tdg). Supported comments: `//`, `#`, `%`, `;`, `*`.\r\n\r\nExample of the comment (everything but the first line is optional):\r\n\r\n    // TODO: This is title of the issue to create\r\n    // category=SomeCategory issue=123 estimate=30m author=alias\r\n    // This is a multiline description of the issue\r\n    // that will be in the \"Body\" property of the comment\r\n\r\nNote that second line has some optional \"extensions\" added as metadata to the issue by [tdg](https://gitlab.com/ribtoks/tdg). Some are turned into labels and also used by [parent issue updater](https://github.com/ribtoks/parent-issue-update).\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fribtoks%2Ftdg-github-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fribtoks%2Ftdg-github-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fribtoks%2Ftdg-github-action/lists"}