From 49761f032d631f9f9c1a158f459ce90774e5b35f Mon Sep 17 00:00:00 2001 From: shenxianpeng Date: Fri, 26 Jun 2026 23:41:28 +0200 Subject: [PATCH 1/2] chore: switch to inherited org-level config from commit-check/.github Replace the standalone commit-check.toml with a minimal config that inherits from the organization-level base configuration via: inherit_from = "github:commit-check/.github:commit-check.toml" Only the action-repo-specific require_rebase_target is kept locally. All other settings (commit rules, branch types, ignore_authors) are now managed centrally in commit-check/.github/commit-check.toml. --- commit-check.toml | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/commit-check.toml b/commit-check.toml index dc3b366..667d98e 100644 --- a/commit-check.toml +++ b/commit-check.toml @@ -1,23 +1,4 @@ -[commit] -# https://www.conventionalcommits.org -conventional_commits = true -subject_capitalized = false -subject_imperative = true -subject_max_length = 100 -subject_min_length = 5 -allow_commit_types = ["feat", "fix", "docs", "style", "refactor", "test", "chore", "ci"] -allow_merge_commits = true -allow_revert_commits = true -allow_empty_commits = false -allow_fixup_commits = true -allow_wip_commits = false -require_body = false -require_signed_off_by = false -ignore_authors = ["dependabot[bot]", "copilot[bot]", "pre-commit-ci[bot]"] +inherit_from = "github:commit-check/.github:commit-check.toml" [branch] -# https://conventional-branch.github.io/ -conventional_branch = true -allow_branch_types = ["feature", "bugfix", "hotfix", "release", "chore", "feat", "fix"] require_rebase_target = "origin/main" -ignore_authors = ["dependabot[bot]", "copilot[bot]", "pre-commit-ci[bot]"] From 84ca51a4b84bfe474bf391fea1f15f971ddb3490 Mon Sep 17 00:00:00 2001 From: shenxianpeng Date: Fri, 26 Jun 2026 23:44:34 +0200 Subject: [PATCH 2/2] fix: separate PR title output from commit message output --- main.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 9bb2187..0febe1f 100755 --- a/main.py +++ b/main.py @@ -250,13 +250,21 @@ def run_commit_check() -> int: with open("result.txt", "w", encoding="utf-8") as result_file: # ---- 1. PR title check ------------------------------------------------ + # Always label the PR title section and suppress its banner so the + # output flows consistently with the commit-message section labels: + # + # --- PR Title: + # + # --- Commit 1/1: + # if PR_TITLE_ENABLED and is_pr_event(): pr_title = get_pr_title() if pr_title: rc = run_check_command( - ["--message"], + ["--message", "--no-banner"], result_file, input_text=pr_title, + output_prefix=f"--- PR Title:\n", ) if rc != 0: exit_code = max(exit_code, rc)