summaryrefslogtreecommitdiffstats
path: root/docs/rules.md
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-10-13 05:34:57 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-10-13 05:34:57 +0000
commite2d38cd54491535f409372393baeed787c77388d (patch)
treee9f823c384ee487d30de5ae84c8d3755f6974baa /docs/rules.md
parentReleasing debian version 0.15.1-3. (diff)
downloadgitlint-e2d38cd54491535f409372393baeed787c77388d.tar.xz
gitlint-e2d38cd54491535f409372393baeed787c77388d.zip
Merging upstream version 0.16.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'docs/rules.md')
-rw-r--r--docs/rules.md31
1 files changed, 31 insertions, 0 deletions
diff --git a/docs/rules.md b/docs/rules.md
index 9779c54..eb4b65e 100644
--- a/docs/rules.md
+++ b/docs/rules.md
@@ -30,6 +30,8 @@ M1 | author-valid-email | >= 0.9.0 | Author email address m
I1 | ignore-by-title | >= 0.10.0 | Ignore a commit based on matching its title
I2 | ignore-by-body | >= 0.10.0 | Ignore a commit based on matching its body
I3 | ignore-body-lines | >= 0.14.0 | Ignore certain lines in a commit body that match a regex
+I4 | ignore-by-author-name | >= 0.16.0 | Ignore a commit based on matching its author name
+
## T1: title-max-length
@@ -405,3 +407,32 @@ regex=(^Co-Authored-By)|(^Signed-off-by)
[ignore-body-lines]
regex=(.*)foobar(.*)
```
+
+## I4: ignore-by-author-name
+
+ID | Name | gitlint version | Description
+------|---------------------------|-----------------|-------------------------------------------
+I4 | ignore-by-author-name | >= 0.16.0 | Ignore a commit based on matching its author name.
+
+### Options
+
+Name | gitlint version | Default | Description
+----------------------|-------------------|------------------------------|----------------------------------
+regex | >= 0.16.0 | None | [Python regex](https://docs.python.org/library/re.html) to match against the commit author name. On match, the commit will be ignored.
+ignore | >= 0.16.0 | all | Comma-separated list of rule names or ids to ignore when this rule is matched.
+
+### Examples
+
+#### .gitlint
+
+```ini
+# Ignore all commits authored by dependabot
+[ignore-by-author-name]
+regex=dependabot
+
+# For commits made by anyone with "[bot]" in their name, ignore
+# rules T1, body-min-length and B6
+[ignore-by-author-name]
+regex=(.*)\[bot\](.*)
+ignore=T1,body-min-length,B6
+``` \ No newline at end of file