Skip to content

Commit d2fcb91

Browse files
committed
Simplify workflow
1 parent 8e16afc commit d2fcb91

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
@@ -341,6 +341,7 @@ jobs:
341341
prompt+="Please address this review. Make the requested code changes, then run tests with \`make tests\` and static analysis with \`make phpstan\` to verify."
342342
prompt+=$'\n'
343343
prompt+="Commit each logical change separately with a descriptive message."
344+
prompt+="Push the commits in the repo."
344345
345346
{
346347
echo 'PROMPT<<PROMPT_DELIMITER'
@@ -357,42 +358,25 @@ jobs:
357358
GH_TOKEN: ${{ secrets.PHPSTAN_BOT_FORK_TOKEN }}
358359
PROMPT: ${{ steps.prompt.outputs.PROMPT }}
359360
run: |
361+
git config user.name "phpstan-bot"
362+
git config user.email "ondrej+phpstanbot@mirtes.cz"
363+
360364
claude --model claude-opus-4-6 \
361365
--dangerously-skip-permissions \
362366
--output-format text \
363367
-p "$PROMPT" \
364368
> /tmp/claude-response.txt
365369
366-
- name: Commit and push changes
367-
id: push
368-
run: |
369-
if [ -z "$(git status --porcelain)" ]; then
370-
echo "pushed=false" >> "$GITHUB_OUTPUT"
371-
exit 0
372-
fi
373-
374-
git config user.name "phpstan-bot"
375-
git config user.email "ondrej+phpstanbot@mirtes.cz"
376-
git add -A
377-
git commit -m "Address review feedback on PR #${{ inputs.pr_number }}"
378-
git push
379-
echo "pushed=true" >> "$GITHUB_OUTPUT"
380-
381370
- name: Reply to review
382371
if: always()
383372
env:
384373
GH_TOKEN: ${{ secrets.PHPSTAN_BOT_PR_TOKEN }}
385-
PUSHED: ${{ steps.push.outputs.pushed }}
386374
run: |
387375
body=""
388376
if [ -f /tmp/claude-response.txt ]; then
389377
body=$(cat /tmp/claude-response.txt)
390378
fi
391379
392-
if [ "$PUSHED" = "true" ]; then
393-
body+=$'\n\n---\n_I pushed a commit addressing this review._'
394-
fi
395-
396380
if [ -z "$body" ]; then
397381
body="I processed this review but have nothing to report."
398382
fi

0 commit comments

Comments
 (0)