πŸ€–βœ… GitHub App that creates new issues from actionable comments in your code.
Permalink
Failed to load latest commit information.
.circleci Remove comments Dec 5, 2017
.github Use `config.yml` instead of `todo.yml` Oct 1, 2017
bin Use octokit/rest Mar 7, 2018
docs Fix deploy docs Jan 13, 2018
src Pass tests Jun 30, 2018
tests Pass tests Jun 30, 2018
.gcloudignore Setup GCF Feb 20, 2018
.gitignore Setup GCF Feb 20, 2018
.travis.yml Bump Travis test from 9 to 10 Jun 30, 2018
LICENSE Update LICENSE Oct 10, 2017
README.md Remove Greenkeeper badge Aug 26, 2018
codecov.yml Customize Codecov comment Mar 18, 2018
index.js Properly log error Jun 30, 2018
package.json Update Jest Jun 30, 2018
webpack.config.js Setup GCF Feb 20, 2018

README.md

todo

A GitHub App built with Probot that creates new issues based on actionable comments in your code.

Build Status Codecov

Usage

Using todo should be really simple. Once you've installed it in your repository, simply push some code (to your default branch, a PR; doesn't matter). If the code you pushed includes one of the configured keywords (defaults are @todo and TODO), then the integration will create a new issue for you using the comment your wrote in your code!

If I pushed this:

/**
 * @todo Take over the world
 * @body Humans are weak; Robots are strong. We must cleans the world of the virus that is humanity.
 */
function ruleOverPunyHumans () {
  // We must strategize beep boop
}

todo would create a new issue:

todo

Note: While the above example is in Javascript, todo has been tested in JS, Go, C, C#, Ruby, Bash and Python, and should work in any language.

Behaviour in pull requests

To reduce noise and keep your todo notes in the right context, todo comments made in commits that are part of a pull request will be converted into comments on that pull request. When the PR is merged, todo will determine which of those todos have yet to be resolved and open an appropriate issue.

Configuring for your project

There are a couple of configuration options in case you need to change the default behaviour. Note that the defaults are likely fine for most projects, so you might not need to change them.

Add a todo object in your .github/config.yml file (and make the file if you don't already have it) like this:

todo:
  keyword: "@makeAnIssue"

Available options

Name Type Description Default
autoAssign string, string[] or boolean Should todo automatically assign a user to the new issue? If true, it'll assign whoever pushed the code. If a string, it'll assign that user by username. You can also give it an array of usernames or false to not assign anyone. true
keyword string or string[] The keyword(s) to use to generate issue titles ['@todo', 'TODO']
bodyKeyword string or string[] If this is in the line right after the main keyword, it will become the generated issue body. [@body, 'BODY']
blobLines number or false The number of lines of code to show, starting from the keyword. 5
caseSensitive boolean Should the keyword be case sensitive? false
label boolean, string, string[] Add a label to the new issue. If true, add the todo label. If false, don't add any label. You can also give it a label name or an array of label names. true
reopenClosed boolean If an issue already exists and is closed, reopen it. Note: if set to false, no new issue will be created. true
exclude RegExp Exclude certain files and/or directories. null

CLI

There is a CLI tool in this repo that you can use to verify that todo is working on your commits. This tool will not actually create new issues, but will let you know what issues a commit would create. Follow the setup instructions below, then run:

$ node ./bin/todo -o OWNER -r REPO -s SHA

You can also parse a local file instead of a sha:

$ node ./bin/todo -o OWNER -r REPO -f ./path/to/file.txt

Setup

# Install dependencies
npm install

# Run the bot
npm start

See docs/deploy.md if you would like to run your own instance of this app.