Files
claude-code-action/examples/workflow-dispatch-agent.yml
2025-07-28 12:27:05 -07:00

41 lines
1.4 KiB
YAML

name: Claude Commit Analysis
on:
workflow_dispatch:
inputs:
analysis_type:
description: "Type of analysis to perform"
required: true
type: choice
options:
- summarize-commit
- security-review
default: "summarize-commit"
jobs:
analyze-commit:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
issues: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 2 # Need at least 2 commits to analyze the latest
- name: Run Claude Analysis
uses: anthropics/claude-code-action@beta
with:
mode: agent
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
override_prompt: |
Analyze the latest commit in this repository.
${{ github.event.inputs.analysis_type == 'summarize-commit' && 'Task: Provide a clear, concise summary of what changed in the latest commit. Include the commit message, files changed, and the purpose of the changes.' || '' }}
${{ github.event.inputs.analysis_type == 'security-review' && 'Task: Review the latest commit for potential security vulnerabilities. Check for exposed secrets, insecure coding patterns, dependency vulnerabilities, or any other security concerns. Provide specific recommendations if issues are found.' || '' }}