GitXplorerGitXplorer
J

todo

public
747 stars
70 forks
0 issues

Commits

List of commits on branch master.
Verified
b17e10b406768059f38899cdb0fcf8126b97a4c2

Update README.md

JJasonEtco committed 3 years ago
Verified
fc9f2533c0a4db8bdd13ea0feb9c3ed9a537b69c

Merge pull request #265 from JasonEtco/dependabot/npm_and_yarn/lodash-4.17.19

JJasonEtco committed 4 years ago
Verified
05e5ca01d3d358ac8d9b19c3a2a9f1ee6f0ebbda

Bump lodash from 4.17.15 to 4.17.19

ddependabot[bot] committed 4 years ago
Verified
969cc510102296d002fe3c4c432f5eb7815c3abf

Merge pull request #249 from jonasbn/eliminate-warning

JJasonEtco committed 4 years ago
Unverified
f6f691a28824d0187d37e670cf34012973c3d3aa

Eliminated warning

jjonasbn committed 5 years ago
Verified
b4bf28cea7191b4f6094c4da6b7ba8f05554cbba

Merge pull request #244 from JasonEtco/dep-updates

JJasonEtco committed 5 years ago

README

The README file for this repository.

This repository has been archived

See this discussion for details on why!


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

GitHub Actions 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 cleanse 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: Adding a configuration file is completely optional. 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 boolean, string[], string 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[] The keyword(s) to use to generate issue titles ['@todo','TODO']
bodyKeyword string[] If this is in the line right after the main keyword, it will become the generated issue body. ['@body','BODY']
blobLines number, boolean 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[] 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 string Exclude certain files and/or directories. Should be a valid regular expression. 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

Or check a merged PR:

$ node ./bin/todo -o OWNER -r REPO --pr NUMBER

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.