From 5f5af001bce061582701bc1f1fa0f12166792440 Mon Sep 17 00:00:00 2001 From: Pierre Warnier Date: Mon, 21 Sep 2026 14:30:57 +0200 Subject: [PATCH] ci: do not read a bot's pull-request text for AI tooling names Renovate's #319 failed the trace check on its body, which is the pasted release notes of uucore 0.12 and names a code-review tool in the title of an upstream coreutils change. Nobody here wrote that text, and a dependency update should not fail over it. A bot's title and body are now passed to the check as empty; its commits and its diff are checked as before, and a human's title and body still are. --- .github/scripts/no-ai-traces.sh | 3 ++- .github/workflows/ci.yml | 8 ++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/scripts/no-ai-traces.sh b/.github/scripts/no-ai-traces.sh index 5bfb825..9c6713e 100755 --- a/.github/scripts/no-ai-traces.sh +++ b/.github/scripts/no-ai-traces.sh @@ -8,7 +8,8 @@ # and unrelated files are not scanned. # # Usage: no-ai-traces.sh [BASE_REF] (default: origin/main) -# PR_TITLE / PR_BODY may be set in the environment to also check them. +# PR_TITLE / PR_BODY may be set in the environment to also check them +# (the workflow leaves them empty for a bot's pull request). set -uo pipefail diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9514f97..ebef46b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,8 +39,12 @@ jobs: - name: Check commits, PR text and added lines env: # Passed through the environment; never interpolated into the shell. - PR_TITLE: ${{ github.event.pull_request.title }} - PR_BODY: ${{ github.event.pull_request.body }} + # A bot's title and body are not checked: Renovate pastes the + # release notes of whatever it bumps, and uucore 0.12's named a + # code-review tool, which failed a dependency update over text + # nobody here wrote. Its commits and diff are still checked. + PR_TITLE: ${{ github.event.pull_request.user.type != 'Bot' && github.event.pull_request.title || '' }} + PR_BODY: ${{ github.event.pull_request.user.type != 'Bot' && github.event.pull_request.body || '' }} run: | git fetch --no-tags origin "${{ github.base_ref }}" .github/scripts/no-ai-traces.sh FETCH_HEAD