Skip to main content
Plugins / TODO-Checker

TODO-Checker

by Epsilon_02

Plugin to check if TODOs/FIXMEs has an open issue number to the project repository (currently only forgejo/gitea supported)


Settings

Settings Name Default Description
prefix_regex (TODO|FIXME) prefix which should a comment start to check if there should exist a issue number
main_regex ( |)\(#?(?P<ISSUE_NUMBER>\d+)\) main regex to check how the issue number should be defined. IMPORTANT: if you want to build a custom regex, the name of the capturing group "ISSUE_NUMBER" have to be defined which only returns the issue-number!
page_size default page size which is provided by the forge (default and max are available with forgejo)
working_directory . the working directory where the checker should run. (only ignore-files in this specific directory are recognized)
repository_token `` token if the repository to be checked is private
single_issue_check false make a request for each issue found (could be result into less/more requests to the forge-API if less/more TODO/FIXME found then pages of the issuelist)
debug false enable debug output

Building custom regex

This plugin is build in rust, so it uses the regex crate under the hood. If you want to build your own regex use the rust regex syntax.

Versions

1.x.x (not maintained anymore)

Version 1.x.x was written in shell (with ripgrep under the hood) and works with the following ignore files: .rgignore, .ignore, .gitignore. It treats .rgignore-files with higher precedence than .ignore-files and .ignore-files with a higher precedence than .gitignore. Check also the ripgrep manual out for further reading.

2.x.x (recommended)

Since version 2.x.x. The plugin got a complete rust rewrite and made compatible with the latest forgejo API (also currently with Gitea but can break anytime when the API diverge). Ignore files which are supported are the following: .ignore and .gitignore.

Examples

  - name: 'Check TODOs/FIXMEs'
    image: codeberg.org/epsilon_02/todo-checker
    settings:
      debug: true
      single_issue_check: true
      working_directory: ./only_check_this_folder

With token:

  - name: 'Check TODOs/FIXMEs'
    image: codeberg.org/epsilon_02/todo-checker
    settings:
      repository_token:
        from_secret: todo_checker_token