From e2d38cd54491535f409372393baeed787c77388d Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 13 Oct 2021 07:34:57 +0200 Subject: Merging upstream version 0.16.0. Signed-off-by: Daniel Baumann --- docs/rules.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'docs/rules.md') 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 -- cgit v1.2.3