From 59b5c3245c11d0165a7e414de4785fc103d6c913 Mon Sep 17 00:00:00 2001 From: "yen.nguyen" Date: Mon, 30 Mar 2026 12:28:56 +0200 Subject: [PATCH] fix claude prompt --- .gitea/workflows/claude.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.gitea/workflows/claude.yml b/.gitea/workflows/claude.yml index 7cf6a0c..a81da1a 100644 --- a/.gitea/workflows/claude.yml +++ b/.gitea/workflows/claude.yml @@ -20,10 +20,10 @@ jobs: LABELS='${{ toJson(github.event.issue.labels) }}' echo "Raw labels: $LABELS" IS_BUG=$(echo "$LABELS" | jq '[.[].name | ascii_downcase] | any(. == "bug")' 2>/dev/null || echo "false") - IS_IDEATION=$(echo "$LABELS" | jq '[.[].name | ascii_downcase] | any(. == "help wanted")' 2>/dev/null || echo "false") + IS_ENHANCEMENT=$(echo "$LABELS" | jq '[.[].name | ascii_downcase] | any(. == "enhancement")' 2>/dev/null || echo "false") echo "is_bug=$IS_BUG" >> $GITHUB_OUTPUT - echo "is_ideation=$IS_IDEATION" >> $GITHUB_OUTPUT - echo "is_bug=$IS_BUG | is_ideation=$IS_IDEATION" + echo "is_enhancement=$IS_ENHANCEMENT" >> $GITHUB_OUTPUT + echo "is_bug=$IS_BUG | is_enhancement=$IS_ENHANCEMENT" - name: Checkout repository uses: actions/checkout@v4 @@ -189,11 +189,11 @@ jobs: -d "$PAYLOAD" # ───────────────────────────────────────────── - # IDEATION FLOW: research + comment only + # ENHANCEMENT FLOW: research + comment only # ───────────────────────────────────────────── - - name: "[Ideation] Run Claude Code to research" - if: steps.classify.outputs.is_ideation == 'true' - id: claude-ideation + - name: "[Enhancement] Run Claude Code to research" + if: steps.classify.outputs.is_enhancement == 'true' + id: claude-enhancement env: ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} ISSUE_NUMBER: ${{ github.event.issue.number }} @@ -221,19 +221,19 @@ jobs: --allowedTools "Read,Glob,Grep,WebSearch,WebFetch" \ --max-turns 15 \ --output-format text \ - -p "$PROMPT" > /tmp/claude_ideation_output.txt 2>&1 || true + -p "$PROMPT" > /tmp/claude_enhancement_output.txt 2>&1 || true echo "--- Claude output ---" - cat /tmp/claude_ideation_output.txt + cat /tmp/claude_enhancement_output.txt - - name: "[Ideation] Comment research findings on issue" - if: steps.classify.outputs.is_ideation == 'true' + - name: "[Enhancement] Comment research findings on issue" + if: steps.classify.outputs.is_enhancement == 'true' env: GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} REPO: ${{ github.repository }} ISSUE_NUMBER: ${{ github.event.issue.number }} BASE_URL: ${{ github.server_url }} run: | - RESEARCH=$(cat /tmp/claude_ideation_output.txt 2>/dev/null || echo "Research output unavailable.") + RESEARCH=$(cat /tmp/claude_enhancement_output.txt 2>/dev/null || echo "Research output unavailable.") COMMENT=$(printf "## Research Findings\n\nI've explored the codebase and researched this idea. Here's what I found:\n\n%s\n\n---\n*This research was performed automatically by Claude Code. Feel free to discuss further in the comments.*" \ "$RESEARCH") PAYLOAD=$(jq -n --arg body "$COMMENT" '{body: $body}')