Skip to content

Commit 82b06bc

Browse files
david-fraleyclaude
andcommitted
fix: simplify JSON schema in classify-issue-severity workflow
The previous JSON schema was too complex with allOf conditionals, which likely caused the claude-code-action to fail. Changes: 1. Simplified JSON schema - removed allOf, if/then conditions, and enum constraints 2. Changed claude_args to multi-line format for better readability and to avoid potential escaping issues 3. Keep only required fields: status and reasoning 4. Make severity and next_steps optional (validated in later step) The schema now matches the simpler patterns used in claude-code-action test workflows, which should be more reliable. Fixes workflow run: https://github.com/coder/coder/actions/runs/20149538756 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 48484af commit 82b06bc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/workflows/classify-issue-severity.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ jobs:
3131
uses: anthropics/claude-code-action@f0c8eb29807907de7f5412d04afceb5e24817127 # v1.0.23
3232
with:
3333
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
34-
claude_args: --json-schema '{"type":"object","properties":{"status":{"type":"string","enum":["classified","insufficient_info"]},"severity":{"type":"string","enum":["s0","s1","s2","s3","s4"]},"reasoning":{"type":"string"},"next_steps":{"type":"array","items":{"type":"string"}}},"required":["status","reasoning"],"allOf":[{"if":{"properties":{"status":{"const":"classified"}}},"then":{"required":["severity"]}},{"if":{"properties":{"status":{"const":"insufficient_info"}}},"then":{"required":["next_steps"]}}]}'
34+
claude_args: |
35+
--json-schema '{"type":"object","properties":{"status":{"type":"string"},"severity":{"type":"string"},"reasoning":{"type":"string"},"next_steps":{"type":"array","items":{"type":"string"}}},"required":["status","reasoning"]}'
3536
prompt: |
3637
You are an expert software engineer triaging customer-reported issues for Coder, a cloud development environment platform.
3738

0 commit comments

Comments
 (0)