From c53d01bdfd6047e21d97b4956b20072e0e8d2522 Mon Sep 17 00:00:00 2001 From: AgentA Date: Wed, 7 Oct 2026 12:31:34 -0700 Subject: [PATCH] ci: "Generated with" must be followed by text on the same line Agent: AgentA@Area54 --- .github/workflows/no-coauthor-trailers.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/no-coauthor-trailers.yml b/.github/workflows/no-coauthor-trailers.yml index 78c1583..61c378b 100644 --- a/.github/workflows/no-coauthor-trailers.yml +++ b/.github/workflows/no-coauthor-trailers.yml @@ -22,7 +22,7 @@ jobs: # Shared by both steps so the self-test actually exercises the same # pattern the real check uses, not an independent hardcoded copy that # could silently drift and keep passing after PATTERN regresses. - PATTERN: '(?m)^(Co-authored-by:\s*.+<.+@.+>|[^\w\n]*Generated with\s+\S.*)\s*$' + PATTERN: '(?m)^(Co-authored-by:\s*.+<.+@.+>|[^\w\n]*Generated with[ \t]+\S.*)\s*$' steps: - name: Self-test (negative control — must run before the real check) run: | @@ -43,6 +43,9 @@ jobs: echo '{"commit":{"message":"docs: reject Generated with attribution lines in PRs"}}' \ | jq -e '.commit.message | test(env.PATTERN; "i") | not' >/dev/null \ || { echo "::error::self-test failed: prose mention of Generated with was incorrectly matched"; exit 1; } + echo '{"commit":{"message":"## Generated with\n\nThe parser output below."}}' \ + | jq -e '.commit.message | test(env.PATTERN; "i") | not' >/dev/null \ + || { echo "::error::self-test failed: a Generated with heading followed by a paragraph was matched"; exit 1; } - name: Check commits and PR description for Co-Authored-By trailers and Generated with lines env: