Skip to content

Commit aa1e271

Browse files
committed
fix(perf): Use GH API instead of full repo clone
Signed-off-by: Marcel Müller <marcel-mueller@gmx.de>
1 parent 635c9cb commit aa1e271

1 file changed

Lines changed: 3 additions & 11 deletions

File tree

workflow-templates/ai-policy.yml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,15 @@ concurrency:
2727

2828
jobs:
2929
check-ai-trailers:
30-
runs-on: ubuntu-latest
30+
runs-on: ubuntu-latest-low
3131
steps:
32-
- name: Checkout
33-
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
34-
with:
35-
fetch-depth: 0
36-
persist-credentials: false
37-
3832
- name: Collect PR commit messages
3933
id: collect
4034
env:
41-
BASE_REF: ${{ github.base_ref }}
35+
GH_TOKEN: ${{ github.token }}
4236
run: |
4337
set -euo pipefail
44-
git fetch origin "${BASE_REF}"
45-
MERGE_BASE=$(git merge-base "origin/${BASE_REF}" HEAD)
46-
git log --format="%B" "${MERGE_BASE}..HEAD" > /tmp/pr_commits.txt
38+
gh api ${{ github.event.pull_request.commits_url }} | jq -r '.[] | .commit.message' > /tmp/pr_commits.txt
4739
echo "--- PR commit messages ---"
4840
cat /tmp/pr_commits.txt
4941
echo "--------------------------"

0 commit comments

Comments
 (0)