• Stars
    star
    1,286
  • Rank 36,580 (Top 0.8 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created about 10 years ago
  • Updated over 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Git hook to convert your TODOs into Github issues

npm version Dependency Status Flattr this git repo Gittip donate

github-todos

Github-Todos is a git hook to convert your TODOs into Github issues.

You can read the full presentation from wiki for detailed information.

Basic usage

  • Install hook on your repository
# If you're not using Github, set service FIRST
github-todos config service bitbucket # check out github-todos list-services

github-todos init
  • Check and maybe tweak configuration
github-todos config --defaults

# want to enable issue injection?
github-todos config inject-issue true

# check configuration help
github-todos help config
  • Work, commit, push
[Github-Todos] Checking Github Authentication… OK
[Github-Todos] Created issue #11 (do something better) - https://github.com/user/repo/issues/11
[Github-Todos] Created issue #12 (add security filter) - https://github.com/user/repo/issues/12
[Github-Todos] Added comment to issue #12 (add security filter) - https://github.com/user/repo/issues/11/#…
[Github-Todos] Injecting issue numbers to files…
[Github-Todos] Added a commit containing issue injections

Install

npm install -g github-todos

Authenticate to Github

github-todos auth

Configuration

There seems to be a lot of options, but as this tool can have critical impact on your project (creating dumb issues, causing conflicts on workspace…) it's important for it to have conservative defaults, and for you to understand these options.

Use github-todos help config for more details (including formats). Here is a short-list of most probably useful options:

  • Repository configuration:
    • repo is the repository to create issues on (format: "user/repository", default: guessed from remote origin)
    • service is the issue service (default: "github", available: "github")
    • branches are the branches on which the hook will be enabled (default: master,develop)
    • remotes are the remotes on which the hook will be enabled (advice: setting more than one will cause duplicate issues when you will push the same commits to different enabled remotes, default: origin)
    • files are the files on which the hook will be enabled (default: **, prefix with a dash - to exclude, for example **,-vendors/**).
  • Detection:
    • label.<MARKER> enables a marker and associates a Github label to it (default: label.TODO=TODO and label.FIXME=TODO)
    • label-whitespace forces a whitespace to be found next to marker to trigger hook (default: true)
    • case-sensitive forces case sensitivity (default: false)
  • Others:
    • inject-issue hook will modify your files (and commit changes, after push) to add issue number next to TODOs (default: false)
    • confirm-create hook will ask for user confirmation before opening any new issue (default: true)
    • open-url will open issues and comments in your main browser (default: false)
    • context is the number of line you want to include in your issue or comment body (default: 3)

.github-todos-ignore

This file will contain all TODOs you wish to automatically ignore (false positives, issues that should not be created on purpose…).

For example, if your .github-todos-ignore file is as follows:

write something useful

and you're about to commit the following TODOs

+ TODO write something useful
+ TODO write something useful please

then the first one will be simply ignored.

Advanced usage

Environment variables

Some behavior can be altered using environment variables. Why not use CLI arguments? Because you may want to enable those options during a git push. For example DRY_RUN=1 git push to simulate safely, or NO_GITHUB_TODOS=1 git push for faster push.

  • set DRY_RUN=1 to simulate instead of really execute: in this mode no call to Github API will occur, and issues will not be injected even if inject-issue option is enabled.
    • Note that in this mode the git hook will fail, which should abort the git command
  • set NO_GITHUB_TODOS=1 to entirely disable Github-Todos.
  • set SHOW_TIME=1 to display the time spent in Github-Todos (if you suspect it dramatically slows down your git push, that can be a good start).
  • set DEBUG=github-todos to show verbose internal debugging information.

Cleanup

If you want to uninstall hook for current repository:

github-todos init --no-connect --uninstall

More Repositories

1

json-server-gui

GUI for json-server
JavaScript
224
star
2

js-php-unserialize

JavaScript tool to unserialize data taken from PHP. It can parse "serialize()" output, or even serialized sessions data.
JavaScript
138
star
3

node-ftp-server

Featureless FTP server
JavaScript
82
star
4

show-time

Watch TV shows and movies with a simple CLI
JavaScript
76
star
5

node-jus-i18n

Full-featured I18N module for Node.js
JavaScript
21
star
6

ABBundle

Symfony 2 bundle to ease A/B testing
PHP
18
star
7

node-chat-socketio-handshake

Demo pour mon blog
JavaScript
15
star
8

node-base-converter

Simple math module (mainly to train with npm)
JavaScript
15
star
9

connect-access-control

Connect (Express) Access Control simple middleware
JavaScript
14
star
10

cli-fuzzy-search

CLI library to provide a fuzzy search box with suggestions
JavaScript
12
star
11

node-every-stream

Stream everything, from/to everywhere
JavaScript
12
star
12

301.tl

Source code for 301.tl URL shortener
JavaScript
9
star
13

fun-helpers

JavaScript library providing some functional helpers, all very Promise-friendly
JavaScript
8
star
14

ender-swig

Swig module for Ender
JavaScript
8
star
15

node-twitter-timeline-cleaner

`ttc` provides some useful statistics about your account, helping you to cleanup your timeline
JavaScript
7
star
16

i18ntools

Play! module for i18n
Python
7
star
17

MicroJS

µJS is the ltimate micro-library to build you own fully featured framework for Javascript
JavaScript
5
star
18

lyonjs2012-03

Présentation Headless browsers au LyonJS Mars 2012
JavaScript
5
star
19

lyonjs2011-10

Slides et démo pour LyonJS Octobre 2011
JavaScript
5
star
20

videocast

Send video files to your Chromecast from your CLI, control volume, seek, pause, stop... from your terminal
JavaScript
5
star
21

node-drupal-notifications

Node.JS+Socket.IO server and client to allow realtime notifications (demoed with Drupal, but generic purpose)
JavaScript
5
star
22

node-npm-metadata-mirror

Monitor NPM changes and keep an up-to-date mirror of modules metadata (not the whole data, i.e. including attachments info, but not attachments body)
JavaScript
4
star
23

Symfony2Tools

My personal toolbox for Symfony2 projects
Shell
4
star
24

formation-nodejs-avril-2013

Dépôt de la formation Node.js des 22 & 23 avril 2013
JavaScript
4
star
25

node-ETL

An ETL (inspired by Talend Open Studio, but let's use some code instead of GUI) for Node
CoffeeScript
3
star
26

javascript-questions-cli

JavaScript quizz, right in your terminal
JavaScript
3
star
27

wordpress-304

Wordpress plugin that properly enables support for 304 - Not Modified HTTP status
PHP
3
star
28

inquirer-checkbox-status

Checkbox prompt for Inquirer with live custom status info about current selection
JavaScript
2
star
29

node-phishing-detector

This module will allow you to detect phishing URLs based on any source (default is Phishtank)
JavaScript
2
star
30

node-jus-task

Fully functional CLI task tool for the framework "jus" (WiP)
JavaScript
2
star
31

formation-node-2020-07

CSS
2
star
32

punch-rss-generator

Generate your RSS file along with Punch blog content handler
JavaScript
2
star
33

android-horaires-sncf

Application de visualisation en direct des prochains départs de votre gare la plus proche
2
star
34

demo-reunion-technique-nodejs

Démos utilisées lors de la réunion technique Node.JS du 17/06/2011 chez Clever Age (note: 1 démo = 1 branche)
2
star
35

test-mobile

Test jQuery Mobile pour un PoC
PHP
1
star
36

node-review-sample

ignore this repo, I'm making some tests
1
star
37

node-filter

Filters to validate values (inspired from PHP's filters API) for Node.js
JavaScript
1
star
38

formation-react-2021-04

Human Coders
CSS
1
star
39

file-share-server

Sample code for BlendWebMix '14
JavaScript
1
star
40

sublime-text-2__config

Ma configuration ST2
Python
1
star
41

formation-react-2020-05

CSS
1
star
42

punch-markdown-highlight

Add syntax highlighting in your Punch contents
JavaScript
1
star
43

Mime-CMS

Draft for a Content Management System based on mime types and intents
1
star
44

demo-json-schema

For PHP Tour Nantes 2012
PHP
1
star
45

doggybag

Stuff we share across our projects. It's like a toolbox but it smells good!
JavaScript
1
star
46

naholyr.github.com

Ruby
1
star
47

formation-react-2016-09

All your base are belong to us
HTML
1
star
48

node-jus-config

Configuration loader for Node.JS, supporting multiple file formats, and loading over multiple directories to allow overriding. Used by Jus framework.
JavaScript
1
star
49

formation-node-2016-10-10

Formation Node 10/10 - 12/10
HTML
1
star
50

node-pending-streams

Streams for pending files
JavaScript
1
star