From 79d58018f47f8b8748e90dbef122277388b21e36 Mon Sep 17 00:00:00 2001 From: LoveJesus Date: Mon, 12 Jan 2026 07:10:58 +0000 Subject: [PATCH] Fix: skip workflow when triggered by bot comments --- .gitea/workflows/edit-chirho.yaml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/edit-chirho.yaml b/.gitea/workflows/edit-chirho.yaml index ad4854b..7100994 100644 --- a/.gitea/workflows/edit-chirho.yaml +++ b/.gitea/workflows/edit-chirho.yaml @@ -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