From aa6ec514c15bf315288a7764ab5052dca1d1a729 Mon Sep 17 00:00:00 2001 From: Jason Etcovitch Date: Sat, 30 Sep 2017 21:04:50 -0400 Subject: [PATCH 1/4] Add todo --- todo.md | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 todo.md diff --git a/todo.md b/todo.md new file mode 100644 index 0000000..6ef66eb --- /dev/null +++ b/todo.md @@ -0,0 +1,59 @@ +--- +title: todo +description: Creates new issues from actionable comments in your code. +slug: todo +screenshots: +- https://user-images.githubusercontent.com/10660468/31048765-83569c30-a5f2-11e7-933a-a119d43ad029.png +authors: [JasonEtco] +repository: JasonEtco/todo +--- +# todo · [![Build Status](https://img.shields.io/travis/JasonEtco/todo.svg)](https://travis-ci.org/JasonEtco/todo) [![Codecov](https://img.shields.io/codecov/c/github/JasonEtco/todo.svg)](https://codecov.io/gh/JasonEtco/todo/) + +> A GitHub App built with [Probot](https://github.com/probot/probot) that creates new issues based on actionable comments in your code. + +## 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 the configured keyword (default is `@todo`), then the integration will create a new issue for you using the comment your wrote in your code! + +If I pushed this: + +```js +/** + * @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](https://user-images.githubusercontent.com/10660468/31048765-83569c30-a5f2-11e7-933a-a119d43ad029.png) + +## 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 file called `todo.yml` in the `.github` folder at the root of your project. + +### 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` | The keyword to use to generate issue titles | `@todo` | +| 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 | + +## Setup + +``` +# Install dependencies +npm install + +# Run the bot +npm start +``` + +See [docs/deploy.md](docs/deploy.md) if you would like to run your own instance of this app. From dfef557d064db24d6d8a8de8dad7e1461201867a Mon Sep 17 00:00:00 2001 From: JasonEtco Date: Sat, 30 Sep 2017 21:15:11 -0400 Subject: [PATCH 2/4] Fix todo.md --- todo.md => _apps/todo.md | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) rename todo.md => _apps/todo.md (66%) diff --git a/todo.md b/_apps/todo.md similarity index 66% rename from todo.md rename to _apps/todo.md index 6ef66eb..465b53b 100644 --- a/todo.md +++ b/_apps/todo.md @@ -7,20 +7,16 @@ screenshots: authors: [JasonEtco] repository: JasonEtco/todo --- -# todo · [![Build Status](https://img.shields.io/travis/JasonEtco/todo.svg)](https://travis-ci.org/JasonEtco/todo) [![Codecov](https://img.shields.io/codecov/c/github/JasonEtco/todo.svg)](https://codecov.io/gh/JasonEtco/todo/) - > A GitHub App built with [Probot](https://github.com/probot/probot) that creates new issues based on actionable comments in your code. ## 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 the configured keyword (default is `@todo`), then the integration will create a new issue for you using the comment your wrote in your code! - If I pushed this: ```js /** * @todo Take over the world - * @body Humans are weak; Robots are strong. We must cleans the world of the virus that is humanity. + * @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 @@ -45,15 +41,3 @@ Add a file called `todo.yml` in the `.github` folder at the root of your project | keyword | `string` | The keyword to use to generate issue titles | `@todo` | | 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 | - -## Setup - -``` -# Install dependencies -npm install - -# Run the bot -npm start -``` - -See [docs/deploy.md](docs/deploy.md) if you would like to run your own instance of this app. From 9ad3d3672b5e9bbb6604d4654792d28852724a70 Mon Sep 17 00:00:00 2001 From: Jason Etcovitch Date: Sat, 30 Sep 2017 21:34:39 -0400 Subject: [PATCH 3/4] Add stars and updated to todo.md --- _apps/todo.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_apps/todo.md b/_apps/todo.md index 465b53b..47700d8 100644 --- a/_apps/todo.md +++ b/_apps/todo.md @@ -6,9 +6,9 @@ screenshots: - https://user-images.githubusercontent.com/10660468/31048765-83569c30-a5f2-11e7-933a-a119d43ad029.png authors: [JasonEtco] repository: JasonEtco/todo +stars: 10 +updated: 2017-09-30 05:57:19 UTC --- -> A GitHub App built with [Probot](https://github.com/probot/probot) that creates new issues based on actionable comments in your code. - ## Usage If I pushed this: From bddf526e11361621e3211f6c3fe8aa67bc8798bb Mon Sep 17 00:00:00 2001 From: Jason Etcovitch Date: Sun, 1 Oct 2017 13:57:22 -0400 Subject: [PATCH 4/4] Update todo.md - Update to use `.github/config.yml` instead of `.github/todo/yml` - Remove stars/updated from front-matter --- _apps/todo.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/_apps/todo.md b/_apps/todo.md index 47700d8..55a2456 100644 --- a/_apps/todo.md +++ b/_apps/todo.md @@ -6,8 +6,6 @@ screenshots: - https://user-images.githubusercontent.com/10660468/31048765-83569c30-a5f2-11e7-933a-a119d43ad029.png authors: [JasonEtco] repository: JasonEtco/todo -stars: 10 -updated: 2017-09-30 05:57:19 UTC --- ## Usage @@ -31,7 +29,13 @@ function ruleOverPunyHumans () { 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 file called `todo.yml` in the `.github` folder at the root of your project. +Add a `todo` object in your `.github/config.yml` file like this: + +```yml +todo: + keyword: "@makeAnIssue" + +``` ### Available options