From 574d4daf87a125c303dd6467dd47552701136806 Mon Sep 17 00:00:00 2001 From: Yashasvi Nancherla Date: Tue, 26 May 2026 11:22:58 +0530 Subject: [PATCH 1/2] Changes default limit of subject from 50 -> 72 --- README.md | 2 +- action.yml | 2 +- check_commits.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 670282f..5b1a8f1 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ Create a new GitHub Actions workflow in your project, e.g. at .github/workflows/ base: ${{ github.event.pull_request.base.sha }} head: ${{ github.event.pull_request.head.sha }} body-char-limit: 72 - sub-char-limit: 50 + sub-char-limit: 72 check-blank-line: true diff --git a/action.yml b/action.yml index 73335ed..d723f6d 100644 --- a/action.yml +++ b/action.yml @@ -17,7 +17,7 @@ inputs: sub-char-limit: required: false - default: "50" + default: "72" description: "Character limit for subject" check-blank-line: diff --git a/check_commits.py b/check_commits.py index 11b3642..dd48b56 100644 --- a/check_commits.py +++ b/check_commits.py @@ -27,7 +27,7 @@ def parse_arguments(): "--head", required=True, help="Head SHA for the range (or single ref)" ) parser.add_argument("--body-limit", type=int, default=72) - parser.add_argument("--sub-limit", type=int, default=50) + parser.add_argument("--sub-limit", type=int, default=72) parser.add_argument("--check-blank-line", type=str, default="true") parser.add_argument("--strict-line-length-check", type=str, default="true") return parser.parse_args() From 2d074320eb59ed860d7494894d6078ef624ed7a2 Mon Sep 17 00:00:00 2001 From: Yashasvi Nancherla Date: Tue, 26 May 2026 11:48:41 +0530 Subject: [PATCH 2/2] Updated strict blank line check in other files --- README.md | 2 ++ action.yml | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5b1a8f1..f582f09 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ This GitHub Action enforces consistent commit message formatting for Qualcomm pr - Commit Subject : Verifies that a subject line is present and does not exceed the specified character limit. - Commit Body : Ensures a body is provided and that each line adheres to the defined word wrap limit. - Check Blank Line Flag: When true, ensures a blank line between the commit subject, body, and Signed-off-by signature for better readability. +- Strict Line Length Check Flag: When false, allows exceeding the character limit if the last word is a single token. # Usage Create a new GitHub Actions workflow in your project, e.g. at .github/workflows/commit-check.yml @@ -35,6 +36,7 @@ Create a new GitHub Actions workflow in your project, e.g. at .github/workflows/ body-char-limit: 72 sub-char-limit: 72 check-blank-line: true + strict-line-length-check: true diff --git a/action.yml b/action.yml index d723f6d..9193aef 100644 --- a/action.yml +++ b/action.yml @@ -24,6 +24,11 @@ inputs: required: false default: "true" description: "check for a blank line between commit title and body" + + strict-line-length-check: + required: false + default: "true" + description: "When false, allows exceeding the character limit if the last word is a single token" runs: using: "composite" @@ -54,4 +59,5 @@ runs: --head "${{ inputs.head }}" \ --body-limit "${{ inputs.body-char-limit }}" \ --sub-limit "${{ inputs.sub-char-limit }}" \ - --check-blank-line "${{ inputs.check-blank-line }}" + --check-blank-line "${{ inputs.check-blank-line }}" \ + --strict-line-length-check "${{ inputs.strict-line-length-check }}"