File tree Expand file tree Collapse file tree 5 files changed +34
-22
lines changed Expand file tree Collapse file tree 5 files changed +34
-22
lines changed Original file line number Diff line number Diff line change 99
1010Installs [ git hooks] ( https://git-scm.com/docs/githooks ) that will run in your Elixir project.
1111
12+ Any git hook type is supported, [ check here the hooks list] ( https://git-scm.com/docs/githooks ) .
13+
1214## Table of Contents
1315
1416- [ Installation] ( #installation )
@@ -27,7 +29,7 @@ Add to dependencies:
2729
2830``` elixir
2931def deps do
30- [{:git_hooks , " ~> 0.1.2 " }]
32+ [{:git_hooks , " ~> 0.2.0 " }]
3133end
3234```
3335
@@ -84,16 +86,6 @@ config :git_hooks,
8486
8587## Execution
8688
87- ### Supported hooks
88-
89- Currently, in terms of simplifying the usage of this library, the git hooks are:
90- * pre_commit
91- * pre_push
92- * pre_rebase
93- * pre_receive
94- * pre_applypatch
95- * post_update
96-
9789### Automatic execution
9890
9991The configured mix tasks will run automatically for each [ git hook] ( https://git-scm.com/docs/githooks#_hooks ) .
Original file line number Diff line number Diff line change 1+ {
2+ "skip_files" : [
3+ " lib/mix/tasks/git_hooks/install.ex"
4+ ],
5+ "coverage_options" : {
6+ "minimum_coverage" : 90
7+ }
8+ }
Original file line number Diff line number Diff line change @@ -3,11 +3,25 @@ defmodule GitHooks.Config do
33
44 @ supported_hooks [
55 :pre_commit ,
6- :pre_push ,
6+ :prepare_commit_msg ,
7+ :commit_msg ,
8+ :post_commit ,
79 :pre_rebase ,
810 :pre_receive ,
11+ :post_receive ,
12+ :post_checkout ,
13+ :post_merge ,
14+ :pre_push ,
15+ :push_to_checkout ,
916 :pre_applypatch ,
10- :post_update
17+ :applypatch_msg ,
18+ :post_applypatch ,
19+ :update ,
20+ :post_update ,
21+ :pre_auto_gc ,
22+ :post_rewrite ,
23+ :sendemail_validate ,
24+ :fsmonitor_watchman
1125 ]
1226
1327 @ spec supported_hooks ( ) :: list ( atom )
Original file line number Diff line number Diff line change @@ -4,17 +4,15 @@ defmodule Mix.Tasks.GitHooks.Run do
44 @ moduledoc """
55 Runs all the configured mix tasks for a given git hook.
66
7- The supported git hooks are:
8- * pre_commit
9- * pre_push
10- * pre_rebase
11- * pre_receive
12- * pre_applypatch
13- * post_update
7+ Any [git hook](https://git-scm.com/docs/githooks) is supported.
148
15- For example, to run the pre_commit hook tasks run:
9+ For example, to run the ` pre_commit` hook tasks run:
1610
1711 `mix git_hooks.run pre_commit`
12+
13+ Or you can also all the configured hooks with:
14+
15+ `mix git_hooks.run all`
1816 """
1917
2018 use Mix.Task
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ defmodule GitHooks.MixProject do
33
44 use Mix.Project
55
6- @ version "0.1.2 "
6+ @ version "0.2.0 "
77
88 def project do
99 [
You can’t perform that action at this time.
0 commit comments