Skip to content

Commit 2cdafd9

Browse files
committed
Simplify workflow
1 parent 30add05 commit 2cdafd9

File tree

1 file changed

+4
-20
lines changed

1 file changed

+4
-20
lines changed

.github/workflows/claude-pr-review.yml

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,7 @@ jobs:
345345
prompt+="Please address this review. Make the requested code changes, then run tests with \`make tests\` and static analysis with \`make phpstan\` to verify."
346346
prompt+=$'\n'
347347
prompt+="Commit each logical change separately with a descriptive message."
348+
prompt+="Push the commits in the repo."
348349
349350
{
350351
echo 'PROMPT<<PROMPT_DELIMITER'
@@ -361,42 +362,25 @@ jobs:
361362
GH_TOKEN: ${{ secrets.PHPSTAN_BOT_FORK_TOKEN }}
362363
PROMPT: ${{ steps.prompt.outputs.PROMPT }}
363364
run: |
365+
git config user.name "phpstan-bot"
366+
git config user.email "ondrej+phpstanbot@mirtes.cz"
367+
364368
claude --model claude-opus-4-6 \
365369
--dangerously-skip-permissions \
366370
--output-format text \
367371
-p "$PROMPT" \
368372
> /tmp/claude-response.txt
369373
370-
- name: Commit and push changes
371-
id: push
372-
run: |
373-
if [ -z "$(git status --porcelain)" ]; then
374-
echo "pushed=false" >> "$GITHUB_OUTPUT"
375-
exit 0
376-
fi
377-
378-
git config user.name "phpstan-bot"
379-
git config user.email "ondrej+phpstanbot@mirtes.cz"
380-
git add -A
381-
git commit -m "Address review feedback on PR #${{ inputs.pr_number }}"
382-
git push
383-
echo "pushed=true" >> "$GITHUB_OUTPUT"
384-
385374
- name: Reply to review
386375
if: always()
387376
env:
388377
GH_TOKEN: ${{ secrets.PHPSTAN_BOT_PR_TOKEN }}
389-
PUSHED: ${{ steps.push.outputs.pushed }}
390378
run: |
391379
body=""
392380
if [ -f /tmp/claude-response.txt ]; then
393381
body=$(cat /tmp/claude-response.txt)
394382
fi
395383
396-
if [ "$PUSHED" = "true" ]; then
397-
body+=$'\n\n---\n_I pushed a commit addressing this review._'
398-
fi
399-
400384
if [ -z "$body" ]; then
401385
body="I processed this review but have nothing to report."
402386
fi

0 commit comments

Comments
 (0)