From aef931e206a94b33757913cdf1fdf1bd45132077 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20M=C3=BCller?= Date: Sun, 14 Jun 2026 12:25:27 +0200 Subject: [PATCH 1/3] fix(perf): Use GH API instead of full repo clone MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marcel Müller --- workflow-templates/ai-policy.yml | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/workflow-templates/ai-policy.yml b/workflow-templates/ai-policy.yml index 0b12fa2..2d02871 100644 --- a/workflow-templates/ai-policy.yml +++ b/workflow-templates/ai-policy.yml @@ -27,23 +27,16 @@ concurrency: jobs: check-ai-trailers: - runs-on: ubuntu-latest + runs-on: ubuntu-latest-low steps: - - name: Checkout - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 - with: - fetch-depth: 0 - persist-credentials: false - - name: Collect PR commit messages id: collect env: - BASE_REF: ${{ github.base_ref }} + GH_TOKEN: ${{ github.token }} + COMMITS_URL: ${{ github.event.pull_request.commits_url }} run: | set -euo pipefail - git fetch origin "${BASE_REF}" - MERGE_BASE=$(git merge-base "origin/${BASE_REF}" HEAD) - git log --format="%B" "${MERGE_BASE}..HEAD" > /tmp/pr_commits.txt + gh api ${COMMITS_URL} | jq -r '.[] | .commit.message' > /tmp/pr_commits.txt echo "--- PR commit messages ---" cat /tmp/pr_commits.txt echo "--------------------------" From d6ee526ea9eccfebd4e85f1d645d3d321882fbce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20M=C3=BCller?= Date: Sun, 14 Jun 2026 12:26:02 +0200 Subject: [PATCH 2/3] fix: Also check for "AI-Assisted-By" trailer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marcel Müller --- workflow-templates/ai-policy.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/workflow-templates/ai-policy.yml b/workflow-templates/ai-policy.yml index 2d02871..4ddfe34 100644 --- a/workflow-templates/ai-policy.yml +++ b/workflow-templates/ai-policy.yml @@ -76,10 +76,10 @@ jobs: run: | set -euo pipefail AI_ASSISTED=false - if grep -qiE '^(AI-assistant|Assisted-by):' /tmp/pr_commits.txt; then + if grep -qiE '^(AI-assistant|Assisted-by|AI-Assisted-By):' /tmp/pr_commits.txt; then AI_ASSISTED=true - echo "Found AI-assistant/Assisted-by trailer(s):" - grep -iE '^(AI-assistant|Assisted-by):' /tmp/pr_commits.txt + echo "Found AI-assistant/Assisted-by/AI-Assisted-By trailer(s):" + grep -iE '^(AI-assistant|Assisted-by|AI-Assisted-By):' /tmp/pr_commits.txt fi echo "ai_assisted=${AI_ASSISTED}" >> "$GITHUB_OUTPUT" From 901610ab297aca1976c394eb6bcfd5ccfb94ba00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20M=C3=BCller?= Date: Sun, 14 Jun 2026 13:28:32 +0200 Subject: [PATCH 3/3] chore: Update AI policy workflow in this repo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marcel Müller --- .github/workflows/ai-policy.yml | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ai-policy.yml b/.github/workflows/ai-policy.yml index 0b12fa2..4ddfe34 100644 --- a/.github/workflows/ai-policy.yml +++ b/.github/workflows/ai-policy.yml @@ -27,23 +27,16 @@ concurrency: jobs: check-ai-trailers: - runs-on: ubuntu-latest + runs-on: ubuntu-latest-low steps: - - name: Checkout - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 - with: - fetch-depth: 0 - persist-credentials: false - - name: Collect PR commit messages id: collect env: - BASE_REF: ${{ github.base_ref }} + GH_TOKEN: ${{ github.token }} + COMMITS_URL: ${{ github.event.pull_request.commits_url }} run: | set -euo pipefail - git fetch origin "${BASE_REF}" - MERGE_BASE=$(git merge-base "origin/${BASE_REF}" HEAD) - git log --format="%B" "${MERGE_BASE}..HEAD" > /tmp/pr_commits.txt + gh api ${COMMITS_URL} | jq -r '.[] | .commit.message' > /tmp/pr_commits.txt echo "--- PR commit messages ---" cat /tmp/pr_commits.txt echo "--------------------------" @@ -83,10 +76,10 @@ jobs: run: | set -euo pipefail AI_ASSISTED=false - if grep -qiE '^(AI-assistant|Assisted-by):' /tmp/pr_commits.txt; then + if grep -qiE '^(AI-assistant|Assisted-by|AI-Assisted-By):' /tmp/pr_commits.txt; then AI_ASSISTED=true - echo "Found AI-assistant/Assisted-by trailer(s):" - grep -iE '^(AI-assistant|Assisted-by):' /tmp/pr_commits.txt + echo "Found AI-assistant/Assisted-by/AI-Assisted-By trailer(s):" + grep -iE '^(AI-assistant|Assisted-by|AI-Assisted-By):' /tmp/pr_commits.txt fi echo "ai_assisted=${AI_ASSISTED}" >> "$GITHUB_OUTPUT"