mirror of
https://github.com/anthropics/claude-code-action.git
synced 2026-01-22 22:44:13 +08:00
refactor: complete v1.0 simplification by removing all legacy inputs
- Remove all backward compatibility for v1.0 simplification - Remove 10 legacy inputs from base-action/action.yml - Remove 9 legacy inputs from main action.yml - Simplify ClaudeOptions type to just timeoutMinutes and claudeArgs - Remove all legacy option handling from prepareRunConfig - Update tests to remove references to deleted fields - Remove obsolete test file github/context.test.ts - Clean up types to remove customInstructions, allowedTools, disallowedTools Users now use claudeArgs exclusively for CLI control.
This commit is contained in:
32
examples/claude-args-example.yml
Normal file
32
examples/claude-args-example.yml
Normal file
@@ -0,0 +1,32 @@
|
||||
name: Claude Args Example
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
prompt:
|
||||
description: "Prompt for Claude"
|
||||
required: true
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
claude-with-custom-args:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Run Claude with custom arguments
|
||||
uses: anthropics/claude-code-action@v1
|
||||
with:
|
||||
mode: agent
|
||||
prompt: ${{ github.event.inputs.prompt }}
|
||||
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||
|
||||
# New claudeArgs input allows direct CLI argument control
|
||||
# Order: -p [claudeArgs] [legacy options] [BASE_ARGS]
|
||||
# Note: BASE_ARGS (--verbose --output-format stream-json) cannot be overridden
|
||||
claude_args: |
|
||||
--max-turns 15
|
||||
--model claude-3-opus-20240229
|
||||
--allowedTools Edit,Read,Write,Bash
|
||||
--disallowedTools WebSearch
|
||||
--system-prompt "You are a senior engineer focused on code quality"
|
||||
@@ -18,11 +18,11 @@ jobs:
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Automatic PR Review
|
||||
uses: anthropics/claude-code-action@beta
|
||||
uses: anthropics/claude-code-action@v1
|
||||
with:
|
||||
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||
timeout_minutes: "60"
|
||||
direct_prompt: |
|
||||
prompt: |
|
||||
Please review this pull request and provide comprehensive feedback.
|
||||
|
||||
Focus on:
|
||||
|
||||
@@ -27,13 +27,14 @@ jobs:
|
||||
fetch-depth: 0 # Full history for better diff analysis
|
||||
|
||||
- name: Code Review with Claude
|
||||
uses: anthropics/claude-code-action@beta
|
||||
uses: anthropics/claude-code-action@v1
|
||||
with:
|
||||
mode: experimental-review
|
||||
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||
# github_token not needed - uses default GITHUB_TOKEN for GitHub operations
|
||||
timeout_minutes: "30"
|
||||
custom_instructions: |
|
||||
prompt: |
|
||||
Review this pull request comprehensively.
|
||||
|
||||
Focus on:
|
||||
- Code quality and maintainability
|
||||
- Security vulnerabilities
|
||||
|
||||
@@ -24,11 +24,11 @@ jobs:
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Claude Code Review
|
||||
uses: anthropics/claude-code-action@beta
|
||||
uses: anthropics/claude-code-action@v1
|
||||
with:
|
||||
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||
timeout_minutes: "60"
|
||||
direct_prompt: |
|
||||
prompt: |
|
||||
Please review this pull request focusing on the changed files.
|
||||
Provide feedback on:
|
||||
- Code quality and adherence to best practices
|
||||
|
||||
@@ -23,11 +23,11 @@ jobs:
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Review PR from Specific Author
|
||||
uses: anthropics/claude-code-action@beta
|
||||
uses: anthropics/claude-code-action@v1
|
||||
with:
|
||||
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||
timeout_minutes: "60"
|
||||
direct_prompt: |
|
||||
prompt: |
|
||||
Please provide a thorough review of this pull request.
|
||||
|
||||
Since this is from a specific author that requires careful review,
|
||||
|
||||
Reference in New Issue
Block a user