Skip to content

README out of sync: missing parameters, wrong permissions, incomplete menu docs #15

README out of sync: missing parameters, wrong permissions, incomplete menu docs

README out of sync: missing parameters, wrong permissions, incomplete menu docs #15

name: Claude Issue Triage
on:
issues:
types: [opened]
issue_comment:
types: [created]
permissions:
contents: write
pull-requests: write
issues: write
id-token: write
jobs:
# Automatic triage when a new issue is opened
auto-triage:
runs-on: ubuntu-latest
if: github.event_name == 'issues'
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Analyze issue and create fix PR
uses: anthropics/claude-code-action@v1
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
prompt: |
A new issue was just opened on this repository. Analyze it and fix it if possible.
Steps:
1. Read the issue title and body to understand the problem.
2. Search the codebase for relevant code (functions, logic, files) related to the issue.
3. Analyze the root cause (for bugs) or plan an implementation approach (for feature requests).
4. If you can create a concrete fix:
a. Create a new branch named fix/issue-<number>-<short-description>
b. Make the necessary code changes
c. Commit with a clear message describing the fix
d. Push the branch and create a pull request that references the issue
e. The PR description should include:
- What the issue was
- What was changed and why
- How to test the fix
f. Comment on the issue linking to the PR
5. If you cannot create a full fix (e.g., needs more context, is a large feature, or is unclear):
a. Post a comment on the issue with:
- A concise analysis of the relevant codebase area
- A proposed approach with specific file/line references
- Code snippets showing the suggested changes
Guidelines:
- Be concise and actionable. Reference specific files and line numbers.
- Format comments with clear markdown headings and code blocks.
- Do not mention that you are an AI or automated agent.
- Only create a PR if the fix is straightforward and you are confident it is correct.
- For complex issues or feature requests, just comment with analysis and guidance.
- Do not modify unrelated code. Keep changes minimal and focused.
claude_args: "--model claude-sonnet-4-6 --max-turns 15"
# On-demand analysis when someone comments @claude on any issue
on-demand:
runs-on: ubuntu-latest
if: github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Respond to mention
uses: anthropics/claude-code-action@v1
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
trigger_phrase: "@claude"
claude_args: "--model claude-sonnet-4-6 --max-turns 15"