Git hook to convert your TODOs into Github issues
JavaScript
1,274
158 commits
updated May 31, 2017
Github-Todos is a git hook to convert your TODOs into Github issues.
You can read the full presentation from wiki for detailed information.
# If you're not using Github, set service FIRST
github-todos config service bitbucket # check out github-todos list-services
github-todos init
github-todos config --defaults
# want to enable issue injection?
github-todos config inject-issue true
# check configuration help
github-todos help config
[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
npm install -g github-todos
github-todos auth
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:
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/**).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)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)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.
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.
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.
NO_GITHUB_TODOS=1 to entirely disable Github-Todos.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).DEBUG=github-todos to show verbose internal debugging information.If you want to uninstall hook for current repository:
github-todos init --no-connect --uninstall
Overall
Maintained
Code review
npm
Latest release
Releases this year
9,086 followers · starred Mar 2015
223 followers · starred Nov 2014
535 followers · starred Nov 2014
1,739 followers · starred Nov 2014
Git hook to convert your TODOs into Github issues
JavaScript
1,274
158 commits
updated May 31, 2017
Github-Todos is a git hook to convert your TODOs into Github issues.
You can read the full presentation from wiki for detailed information.
# If you're not using Github, set service FIRST
github-todos config service bitbucket # check out github-todos list-services
github-todos init
github-todos config --defaults
# want to enable issue injection?
github-todos config inject-issue true
# check configuration help
github-todos help config
[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
npm install -g github-todos
github-todos auth
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:
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/**).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)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)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.
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.
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.
NO_GITHUB_TODOS=1 to entirely disable Github-Todos.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).DEBUG=github-todos to show verbose internal debugging information.If you want to uninstall hook for current repository:
github-todos init --no-connect --uninstall
Overall
Maintained
Code review
npm
Latest release
Releases this year
9,086 followers · starred Mar 2015
223 followers · starred Nov 2014
535 followers · starred Nov 2014
1,739 followers · starred Nov 2014