README.md in git-hook-0.1.8 vs README.md in git-hook-0.1.9
- old
+ new
@@ -43,11 +43,11 @@
task_name:
install -- Init githook, create .githook folder, prepare template files
setup -- Setup hooks, copy hooks from .githook/hooks to .git/hooks
backup -- Backup old hooks in .git/hooks
- clean -- Clear backup hooks in .git/hooks
+ clean -- Clear backup hooks in .git/hooks
disable -- Disable hooks: [HOOKS=pre_commit,commit_msg] githook disable
enable -- Enable hooks: [HOOKS=pre_commit,commit_msg] githook enable
list -- List all hooks
version -- Version
help -- Help
@@ -55,12 +55,16 @@
Getting started:
$ githook install
$ githook setup
-Demos:
+Modify `.githook/config.rb` according to your requirement:
+ $ vim .githook/config.rb
+
+## Demo
+
1. install, setup hooks

1. pre-commit, prepare-commit-msg, commit-msg hooks
@@ -238,9 +242,34 @@
1. [Step-by-Step Guide to Building Your First Ruby Gem](https://quickleft.com/blog/engineering-lunch-series-step-by-step-guide-to-building-your-first-ruby-gem/)
## Note
1. [How to Build a Gem](note/how-to-build-a-gem.md)
+
+## Releases
+
+### 0.1.9
+
+1. Add a `changed_files` util method to get the added or modified files, to make rubocop only check changed files instead of all files.
+
+### 0.1.8
+
+1. Rename `githook clearup` command to `githook clean`
+
+1. Unify `githook pre_commit`, `githook prepare_commit_msg`, `githook commit_msg` commands to `githook run` but with different ENV value
+
+ githook pre_commit --> HOOK=pre_commit githook run
+ githook prepare_commit_msg --> HOOK=prepare_commit_msg githook run
+ githook commit_msg --> HOOK=commit_msg githook run
+
+1. Support gitlab type branch name, for example "100-support-gitlab-branch", it will generate "FEATURE #100 - Support gitlab branch" commit message by `prepare_commit_msg` hook, uncomment `"prepare_commit_msg:prepare_for_gitlab_branch"` line and comment `"prepare_commit_msg:prepare_for_ekohe_branch"` line in `.githook/config.rb` to make it work
+
+ // .githook/config
+ set :prepare_commit_msg, fetch(:prepare_commit_msg, []).push(
+ # comment following lines if you want to skip it
+ # "prepare_commit_msg:prepare_for_ekohe_branch"
+ "prepare_commit_msg:prepare_for_gitlab_branch"
+ )
## License
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).