fix claude prompt
This commit is contained in:
parent
63d41399b8
commit
59b5c3245c
|
|
@ -20,10 +20,10 @@ jobs:
|
||||||
LABELS='${{ toJson(github.event.issue.labels) }}'
|
LABELS='${{ toJson(github.event.issue.labels) }}'
|
||||||
echo "Raw labels: $LABELS"
|
echo "Raw labels: $LABELS"
|
||||||
IS_BUG=$(echo "$LABELS" | jq '[.[].name | ascii_downcase] | any(. == "bug")' 2>/dev/null || echo "false")
|
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_bug=$IS_BUG" >> $GITHUB_OUTPUT
|
||||||
echo "is_ideation=$IS_IDEATION" >> $GITHUB_OUTPUT
|
echo "is_enhancement=$IS_ENHANCEMENT" >> $GITHUB_OUTPUT
|
||||||
echo "is_bug=$IS_BUG | is_ideation=$IS_IDEATION"
|
echo "is_bug=$IS_BUG | is_enhancement=$IS_ENHANCEMENT"
|
||||||
|
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
@ -189,11 +189,11 @@ jobs:
|
||||||
-d "$PAYLOAD"
|
-d "$PAYLOAD"
|
||||||
|
|
||||||
# ─────────────────────────────────────────────
|
# ─────────────────────────────────────────────
|
||||||
# IDEATION FLOW: research + comment only
|
# ENHANCEMENT FLOW: research + comment only
|
||||||
# ─────────────────────────────────────────────
|
# ─────────────────────────────────────────────
|
||||||
- name: "[Ideation] Run Claude Code to research"
|
- name: "[Enhancement] Run Claude Code to research"
|
||||||
if: steps.classify.outputs.is_ideation == 'true'
|
if: steps.classify.outputs.is_enhancement == 'true'
|
||||||
id: claude-ideation
|
id: claude-enhancement
|
||||||
env:
|
env:
|
||||||
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
|
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||||
ISSUE_NUMBER: ${{ github.event.issue.number }}
|
ISSUE_NUMBER: ${{ github.event.issue.number }}
|
||||||
|
|
@ -221,19 +221,19 @@ jobs:
|
||||||
--allowedTools "Read,Glob,Grep,WebSearch,WebFetch" \
|
--allowedTools "Read,Glob,Grep,WebSearch,WebFetch" \
|
||||||
--max-turns 15 \
|
--max-turns 15 \
|
||||||
--output-format text \
|
--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 ---"
|
echo "--- Claude output ---"
|
||||||
cat /tmp/claude_ideation_output.txt
|
cat /tmp/claude_enhancement_output.txt
|
||||||
|
|
||||||
- name: "[Ideation] Comment research findings on issue"
|
- name: "[Enhancement] Comment research findings on issue"
|
||||||
if: steps.classify.outputs.is_ideation == 'true'
|
if: steps.classify.outputs.is_enhancement == 'true'
|
||||||
env:
|
env:
|
||||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||||
REPO: ${{ github.repository }}
|
REPO: ${{ github.repository }}
|
||||||
ISSUE_NUMBER: ${{ github.event.issue.number }}
|
ISSUE_NUMBER: ${{ github.event.issue.number }}
|
||||||
BASE_URL: ${{ github.server_url }}
|
BASE_URL: ${{ github.server_url }}
|
||||||
run: |
|
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.*" \
|
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")
|
"$RESEARCH")
|
||||||
PAYLOAD=$(jq -n --arg body "$COMMENT" '{body: $body}')
|
PAYLOAD=$(jq -n --arg body "$COMMENT" '{body: $body}')
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue