Skip to content

Commit af14e0b

Browse files
committed
Update README with branch white/blacklist config
1 parent 3033c9d commit af14e0b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ Main features are:
2222

2323
## Table of Contents
2424

25+
2526
<!-- vim-markdown-toc GFM -->
2627

2728
* [Installation](#installation)
@@ -30,6 +31,7 @@ Main features are:
3031
* [Manual installation](#manual-installation)
3132
* [Configuration](#configuration)
3233
* [Mix path](#mix-path)
34+
* [Git path](#git-path)
3335
* [Troubleshooting in docker containers](#troubleshooting-in-docker-containers)
3436
* [Auto install](#auto-install)
3537
* [Hook configuration](#hook-configuration)
@@ -131,6 +133,7 @@ Currently there are supported two configuration options:
131133

132134
* **tasks**: A list of the commands that will be executed when running a git hook. [See types of tasks](#type-of-tasks) for more info.
133135
* **verbose**: If true, the output of the mix tasks will be visible. This can be configured globally or per git hook.
136+
* **branches**: Allow or forbid the hook configuration to run (or not) in certain branches using `whitelist` or `blacklist` configuration (see example below).You can use regular expressions to match a branch name.
134137

135138
### Example config
136139

@@ -144,6 +147,10 @@ if Mix.env() == :dev do
144147
config :git_hooks,
145148
auto_install: true,
146149
verbose: true,
150+
branches: [
151+
whitelist: ["feature-.*"],
152+
blacklist: ["master"]
153+
],
147154
hooks: [
148155
pre_commit: [
149156
tasks: [

0 commit comments

Comments
 (0)