- Helps establishing good TODO practices (tag them with an issue number!)
- Adds tagged TODOs into their respective issues and makes sure they won't be forgotten
- Helps manage untagged TODOs that are left in your code
- Set up the workflow by adding a file
.github/workflows/todohub.yml
:
name: Todohub Workflow
on: [push, pull_request]
permissions:
contents: read
issues: write
pull-requests: write
jobs:
todohub-job:
runs-on: ubuntu-latest
steps:
- name: Todohub
id: todohub
uses: todos-in/todohub@main
This Project contains an eslint plugin help you manage local TODOs in your codebase. To use it, install:
npm i --save-dev eslint-plugin-todohub
Note
This documentation shows how to config eslint using an .eslintrc.yml
config file.
There are multiple ways to config eslint, please refer to eslint to find the suitable configuration for your project.
Add todohub
to your eslint plugins section, and enable the recommended rule set:
//.eslintrc.yml
[...]
plugins:
- todohub
extends:
- plugin:todohub/recommended
[...]
Advanced Configuration
The plugin features two rules, which can also be configured individually:
todohub/no-todos-without-issue-ref
: Hints towards All Todos in codebase which do not have an issue number reference (such asTODO #1
). Keeps track of potentially lost Todos. (Recommended to turn on, and set toerror
)todohub/current-feature-branch-issues
: Checks if you are in a feature branch currently and hints towards all open TODOs referencing the current feature branch. Useful to keep track of what you are currently working on. (Recommended to set towarn
)
//.eslintrc.yml
rules:
{
'todohub/no-todos-without-issue-ref': 'error',
'todohub/current-feature-branch-issues': 'warn',
...
}
-
🛠️ Installing
npm install
-
🏗️ Building
npm run bundle
-
✅ Testing
$ npm run test
This project includes a helper script, script/release
designed to streamline the process of tagging and pushing new releases for
GitHub Actions.
GitHub Actions allows users to select a specific version of the action to use, based on release tags. This script simplifies this process by performing the following steps:
- Retrieving the latest release tag: The script starts by fetching the most recent release tag by looking at the local data available in your repository.
- Prompting for a new release tag: The user is then prompted to enter a new release tag. To assist with this, the script displays the latest release tag and provides a regular expression to validate the format of the new tag.
- Tagging the new release: Once a valid new tag is entered, the script tags the new release.
- Pushing the new tag to the remote: Finally, the script pushes the new tag to the remote repository. From here, you will need to create a new release in GitHub and users can easily reference the new tag in their workflows.