Update ai_pr_title_review.yml

This commit is contained in:
Ludy87 2025-06-21 23:37:38 +02:00
parent 5c40efbc85
commit 4a0689f049
No known key found for this signature in database
GPG Key ID: 92696155E0220F94

View File

@ -14,7 +14,6 @@ jobs:
contents: read contents: read
pull-requests: write pull-requests: write
models: read models: read
issues: write
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -40,17 +39,6 @@ jobs:
app-id: ${{ secrets.GH_APP_ID }} app-id: ${{ secrets.GH_APP_ID }}
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }} private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}
- name: Determine GitHub token to use
id: resolve-token
run: |
if [ -n "${{ steps.setup-bot.outputs.token }}" ]; then
echo "Using GitHub App bot token"
echo "token=${{ steps.setup-bot.outputs.token }}" >> $GITHUB_OUTPUT
else
echo "Bot setup failed or token missing falling back to GITHUB_TOKEN"
echo "token=${{ github.token }}" >> $GITHUB_OUTPUT
fi
- name: Check if actor is repo developer - name: Check if actor is repo developer
id: actor id: actor
run: | run: |
@ -168,7 +156,7 @@ jobs:
if: steps.actor.outputs.is_repo_dev == 'true' if: steps.actor.outputs.is_repo_dev == 'true'
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with: with:
github-token: ${{ steps.resolve-token.outputs.token }} github-token: ${{ steps.setup-bot.outputs.token }}
script: | script: |
const fs = require('fs'); const fs = require('fs');
const body = fs.readFileSync('/tmp/ai-title-comment.md', 'utf8'); const body = fs.readFileSync('/tmp/ai-title-comment.md', 'utf8');