Fix: skip workflow when triggered by bot comments

This commit is contained in:
2026-01-12 07:10:58 +00:00
parent 94a3c29214
commit 79d58018f4

View File

@@ -8,7 +8,10 @@ on:
jobs:
edit-chirho:
if: contains(github.event.issue.labels.*.name, 'edit-request-chirho')
# Only run if: has edit-request label AND (is an issue event OR comment is NOT from LoveJesus bot)
if: |
contains(github.event.issue.labels.*.name, 'edit-request-chirho') &&
(github.event_name == 'issues' || github.event.comment.user.login != 'LoveJesus')
runs-on: claude-chirho
steps:
- name: Checkout repository
@@ -20,12 +23,13 @@ jobs:
run: |
echo "Issue Number: ${{ github.event.issue.number }}"
echo "Issue Title: ${{ github.event.issue.title }}"
echo "Event: ${{ github.event_name }}"
echo "Comment Author: ${{ github.event.comment.user.login }}"
- name: Run Claude Code
env:
ISSUE_NUMBER: ${{ github.event.issue.number }}
ISSUE_TITLE: ${{ github.event.issue.title }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
run: |
cd $GITHUB_WORKSPACE
git config user.email "claude@perffection.com"
@@ -42,6 +46,7 @@ jobs:
1. Understand what changes are being requested (consider all messages in the thread)
2. Make the requested edits to the files in the repository
3. Use gitea_create_comment_chirho to post a summary of changes made
4. IMPORTANT: If there are no NEW requests since your last comment, do NOT post another comment
Working directory contains the site files. Make changes directly.
PROMPT_EOF