From 39f1c35a955701f232f8abf5f4437d589a1810e1 Mon Sep 17 00:00:00 2001 From: LoveJesus Date: Mon, 12 Jan 2026 10:55:29 +0000 Subject: [PATCH] Revert to working workflow without Docker --- .gitea/workflows/edit-chirho.yaml | 52 +++++++++++++++---------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/.gitea/workflows/edit-chirho.yaml b/.gitea/workflows/edit-chirho.yaml index 6199382..ef281c8 100644 --- a/.gitea/workflows/edit-chirho.yaml +++ b/.gitea/workflows/edit-chirho.yaml @@ -1,4 +1,3 @@ -# For God so loved the world — John 3:16 name: Claude Edit Workflow on: @@ -9,47 +8,48 @@ on: jobs: edit-chirho: - runs-on: claude-chirho - container: - image: node:20-bookworm + # Only run if: has edit-request label AND (is issue event OR comment is NOT from bot) if: | contains(github.event.issue.labels.*.name, 'edit-request-chirho') && - (github.event_name == 'issues' || github.event.comment.user.login \!= 'claude-bot-chirho') + (github.event_name == 'issues' || github.event.comment.user.login != 'claude-bot-chirho') + runs-on: claude-chirho steps: - name: Checkout repository uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Install Claude Code - run: | - npm install -g @anthropic-ai/claude-code - - name: Run Claude Code - run: | - claude --print "You are editing a customer website based on their feedback. - - Read the issue at: ${{ github.server_url }}/${{ github.repository }}/issues/${{ github.event.issue.number }} - - The issue title is: ${{ github.event.issue.title }} - The issue body is: ${{ github.event.issue.body }} - - Make the requested changes to the site files. Focus on clean, minimal edits - that match the existing code style. Follow the _chirho naming convention." env: - ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY_CHIRHO }} + ISSUE_NUMBER: ${{ github.event.issue.number }} + ISSUE_TITLE: ${{ github.event.issue.title }} + run: | + cd $GITHUB_WORKSPACE + git config user.email "claude-bot@perffection.com" + 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__*" + You are editing a customer website based on feedback. + Issue number ${ISSUE_NUMBER}: ${ISSUE_TITLE} + + IMPORTANT: First use gitea_get_issue_thread_chirho to read the full conversation history. + + After reading the thread: + 1. Look at the LATEST message from the site owner (not from claude-bot-chirho) + 2. If there is a new request, make the edits + 3. Post a brief comment summarizing what you did + 4. If the latest owner message has already been addressed, do nothing + + Working directory contains the site files. Make changes directly. + PROMPT_EOF - name: Commit and push changes run: | - git config --global user.name "Claude Bot" - git config --global user.email "claude-bot-chirho@perffection.com" - git config --global --add safe.directory "$GITHUB_WORKSPACE" + cd $GITHUB_WORKSPACE git add -A if git diff --staged --quiet; then echo "No changes to commit" else - git commit -m "${{ github.event.issue.title }}" + git commit -m "Edit: ${{ github.event.issue.title }}" git push fi - -# JESUS CHRIST IS LORD \ No newline at end of file