File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,23 +27,15 @@ concurrency:
2727
2828jobs :
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 "--------------------------"
@@ -83,10 +75,10 @@ jobs:
8375 run : |
8476 set -euo pipefail
8577 AI_ASSISTED=false
86- if grep -qiE '^(AI-assistant|Assisted-by):' /tmp/pr_commits.txt; then
78+ if grep -qiE '^(AI-assistant|Assisted-by|AI-Assisted-By ):' /tmp/pr_commits.txt; then
8779 AI_ASSISTED=true
88- echo "Found AI-assistant/Assisted-by trailer(s):"
89- grep -iE '^(AI-assistant|Assisted-by):' /tmp/pr_commits.txt
80+ echo "Found AI-assistant/Assisted-by/AI-Assisted-By trailer(s):"
81+ grep -iE '^(AI-assistant|Assisted-by|AI-Assisted-By ):' /tmp/pr_commits.txt
9082 fi
9183 echo "ai_assisted=${AI_ASSISTED}" >> "$GITHUB_OUTPUT"
9284
You can’t perform that action at this time.
0 commit comments