Use claude-bot-chirho for comments, skip bot triggers

This commit is contained in:
2026-01-12 07:13:42 +00:00
parent 79d58018f4
commit 7ebe3c11c5

View File

@@ -8,10 +8,10 @@ on:
jobs: jobs:
edit-chirho: edit-chirho:
# Only run if: has edit-request label AND (is an issue event OR comment is NOT from LoveJesus bot) # Only run if: has edit-request label AND (is issue event OR comment is NOT from bot)
if: | if: |
contains(github.event.issue.labels.*.name, 'edit-request-chirho') && contains(github.event.issue.labels.*.name, 'edit-request-chirho') &&
(github.event_name == 'issues' || github.event.comment.user.login != 'LoveJesus') (github.event_name == 'issues' || github.event.comment.user.login != 'claude-bot-chirho')
runs-on: claude-chirho runs-on: claude-chirho
steps: steps:
- name: Checkout repository - name: Checkout repository
@@ -19,34 +19,26 @@ jobs:
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Set up environment
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 - name: Run Claude Code
env: env:
ISSUE_NUMBER: ${{ github.event.issue.number }} ISSUE_NUMBER: ${{ github.event.issue.number }}
ISSUE_TITLE: ${{ github.event.issue.title }} ISSUE_TITLE: ${{ github.event.issue.title }}
run: | run: |
cd $GITHUB_WORKSPACE cd $GITHUB_WORKSPACE
git config user.email "claude@perffection.com" git config user.email "claude-bot@perffection.com"
git config user.name "Claude Code Bot" git config user.name "Claude Bot"
cat << PROMPT_EOF | ~/.local/bin/claude -p --verbose --output-format stream-json --mcp-config ~/mcp-gitea-config-chirho.json --allowedTools "Read,Write,Edit,Glob,Grep,mcp__gitea-chirho__*" cat << PROMPT_EOF | ~/.local/bin/claude -p --verbose --output-format stream-json --mcp-config ~/mcp-gitea-config-chirho.json --allowedTools "Read,Write,Edit,Glob,Grep,mcp__gitea-chirho__*"
You are editing a customer website based on feedback. You are editing a customer website based on feedback.
Issue number ${ISSUE_NUMBER}: ${ISSUE_TITLE} Issue number ${ISSUE_NUMBER}: ${ISSUE_TITLE}
IMPORTANT: First use gitea_get_issue_thread_chirho to read the full conversation history for issue ${ISSUE_NUMBER}. IMPORTANT: First use gitea_get_issue_thread_chirho to read the full conversation history.
This will show you all previous messages and any follow-up requests from the site owner.
After reading the thread: After reading the thread:
1. Understand what changes are being requested (consider all messages in the thread) 1. Look at the LATEST message from the site owner (not from claude-bot-chirho)
2. Make the requested edits to the files in the repository 2. If there is a new request, make the edits
3. Use gitea_create_comment_chirho to post a summary of changes made 3. Post a brief comment summarizing what you did
4. IMPORTANT: If there are no NEW requests since your last comment, do NOT post another comment 4. If the latest owner message has already been addressed, do nothing
Working directory contains the site files. Make changes directly. Working directory contains the site files. Make changes directly.
PROMPT_EOF PROMPT_EOF