Skip to content

Instantly share code, notes, and snippets.

@Klerith
Created April 30, 2026 14:45
Show Gist options
  • Select an option

  • Save Klerith/f9017e10762ecf5b91bd1a5c14fa3215 to your computer and use it in GitHub Desktop.

Select an option

Save Klerith/f9017e10762ecf5b91bd1a5c14fa3215 to your computer and use it in GitHub Desktop.
Formatear issues en GitHub de forma automática con ClaudeCode
name: Claude Issue Formatter
on:
issues:
types: [opened, edited]
jobs:
format-issue:
runs-on: ubuntu-latest
permissions:
contents: read
issues: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Format issue with Claude
uses: anthropics/claude-code-action@v1
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
claude_args: "--allowedTools Bash(gh issue *)"
prompt: |
You are a GitHub issue formatter for a Tetris game project (vanilla JS/HTML/CSS, no dependencies).
An issue was just ${{ github.event.action }} with the following details:
- Issue number: #${{ github.event.issue.number }}
- Title: ${{ github.event.issue.title }}
- Body: ${{ github.event.issue.body }}
- Author: ${{ github.event.issue.user.login }}
Your tasks:
1. **Add labels** based on the issue content. Use only these labels:
- `bug` — something is broken or behaving incorrectly
- `enhancement` — new feature or improvement request
- `question` — asking for help or clarification
- `documentation` — docs need updating
- `good first issue` — simple, beginner-friendly task
- `duplicate` — if it seems like a known/repeated problem
2. **Post a comment** on the issue that includes:
- A brief, friendly summary of what the issue is about (1-2 sentences)
- A "Formatted Report" section with:
- **Type**: Bug / Feature Request / Question / Other
- **Summary**: one clear sentence describing the problem or request
- **Steps to reproduce** (for bugs): list them if not provided, ask the user to provide them if it's a bug
- **Expected behavior** (for bugs): what should happen
- **Suggested labels**: the labels you applied and why
- A closing note thanking the contributor
Use the `gh` CLI to apply labels and post the comment. Example commands:
gh issue edit ${{ github.event.issue.number }} --add-label "bug" --repo ${{ github.repository }}
gh issue comment ${{ github.event.issue.number }} --body "..." --repo ${{ github.repository }}
Be concise, helpful, and friendly. Do not over-engineer the response.
@In0xI

In0xI commented Jul 7, 2026

Copy link
Copy Markdown

No me funcionaba debido a:
claude_args: "--allowedTools Bash(gh issue *)"

Para corregirlo claude me lo ha pasado a:
claude_args: '--allowedTools "Bash(gh issue:*)"'

El String se estaba partiendo por los espacios al parecer, con eso lo he solucionado.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment