From 7ca5dbe598c4d4460c759efea448a2d017f5752c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nerijus=20Bend=C5=BEi=C5=ABnas?= Date: Fri, 24 Apr 2026 14:29:25 +0300 Subject: [PATCH] fix: add require-trailers to config section and Actions example MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The configuration file section was missing require-trailers from its key list, example toml, and CLI flags sentence. The GitHub Actions inputs example also lacked require-trailer. Signed-off-by: Nerijus Bendžiūnas --- README.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 5a702da..441e6dc 100644 --- a/README.md +++ b/README.md @@ -150,8 +150,9 @@ independently of `--enable`/`--disable`. Place `.commit-guard.toml` in your project root (or any parent directory) to set defaults for `enable`, `disable`, `scopes`, `require-scope`, `types`, -`max-subject-length`, and `min-description-length`. commit-guard searches -upward from the working directory and uses the first file found. +`max-subject-length`, `min-description-length`, and `require-trailers`. +commit-guard searches upward from the working directory and uses the first +file found. ```toml # .commit-guard.toml @@ -161,6 +162,7 @@ require-scope = true types = ["feat", "fix", "chore", "wip"] max-subject-length = 100 min-description-length = 10 +require-trailers = ["Closes", "Reviewed-by"] ``` ```toml @@ -169,8 +171,8 @@ enable = ["subject", "imperative"] ``` CLI flags (`--enable`, `--disable`, `--scopes`, `--require-scope`, `--types`, -`--max-subject-length`, `--min-description-length`) take full precedence and -ignore config file values when provided. +`--max-subject-length`, `--min-description-length`, `--require-trailer`) take +full precedence and ignore config file values when provided. ### Checking a range of commits @@ -248,6 +250,7 @@ jobs: disable: signed-off,signature scopes: auth,api,db require-scope: 'true' + require-trailer: 'Closes,Reviewed-by' max-subject-length: '100' min-description-length: '10' ```