Skip to content

Issue Automation

Fluxbase includes a comprehensive system for automating GitHub issue handling using Claude AI. This allows you to automatically analyze issues, implement fixes, and create pull requests with minimal human intervention.

The automation system consists of three main components:

  1. Issue Templates - Structured templates that capture the information Claude needs
  2. GitHub Actions Workflow - Triggers Claude to fix issues labeled with claude-fix
  3. MCP GitHub Tools - Programmatic access to GitHub from within Claude sessions

First, ensure you have the following GitHub secrets configured in your repository:

  • ANTHROPIC_API_KEY - Your Anthropic API key for Claude access

Use one of the issue templates:

  • Bug Report - For reporting bugs
  • Feature Request - For suggesting new features
  • Claude Fix Request - Specifically designed for automated fixes

Add the claude-fix label to the issue. The automation will:

  1. Create a new branch (claude-fix/issue-{number}-{timestamp})
  2. Analyze the issue and codebase
  3. Implement the fix
  4. Create a PR for review
  5. Comment on the issue with the PR link

The claude-fix label works best for:

  • Bug fixes with clear reproduction steps
  • Small refactoring tasks
  • Documentation updates
  • Test additions
  • Code style/lint fixes
  • Type safety improvements

It’s not recommended for:

  • Large architectural changes
  • Security-sensitive code
  • Breaking API changes
  • Features requiring product decisions

Located in .github/ISSUE_TEMPLATE/:

TemplatePurpose
bug_report.ymlStandard bug reports with severity and component
feature_request.ymlFeature suggestions with priority
claude_fix.ymlStructured format for automated fixes

The .github/workflows/claude-fix.yml workflow:

  • Triggers: Issue labeled with claude-fix, or manual dispatch
  • Actions: Creates branch, runs Claude Code, creates PR
  • Comments: Updates issue with progress and results

Available through the MCP server:

ToolScopeDescription
list_github_issuesgithub:readList issues with filtering
get_github_issuegithub:readGet issue details
create_github_issuegithub:writeCreate new issues
create_github_issue_commentgithub:writeAdd comments
update_github_issue_labelsgithub:writeManage labels
trigger_claude_fixgithub:writeTrigger the fix workflow

Required secrets for the automation:

# GitHub Actions secrets
ANTHROPIC_API_KEY: sk-ant-... # Required for Claude API access

To receive issue events in your Fluxbase server:

Terminal window
# Configure the webhook endpoint
POST /api/v1/admin/branches/github/configs
{
"repository": "owner/repo",
"webhook_secret": "your-webhook-secret"
}

Then in GitHub, add a webhook pointing to:

https://your-fluxbase-server.com/api/v1/webhooks/github

With events:

  • Issues
  • Pull requests
  • Push (optional)

For the best results with Claude Fix:

  1. Be specific - Include file paths, function names, error messages
  2. Provide context - Explain why the fix is needed
  3. Define acceptance criteria - List what “done” looks like
  4. Include reproduction steps - For bugs, show how to trigger the issue
## Task Description
Fix the nil pointer dereference in `internal/auth/service.go` in the
`ValidateToken` function when the token is expired.
**Files to Modify:**
- internal/auth/service.go
- internal/auth/service_test.go
**Acceptance Criteria:**
- [ ] No panic when token is expired
- [ ] Proper error returned for expired tokens
- [ ] Unit test added for this case
- [ ] All existing tests pass

View workflow runs in GitHub Actions:

https://github.com/owner/repo/actions/workflows/claude-fix.yml

The automation adds comments to issues:

  1. Started - When processing begins
  2. Complete - With PR link when done
  3. Failed - With error details if something goes wrong

Check that:

  • The claude-fix label exists in the repository
  • The issue is in “open” state
  • GitHub Actions are enabled
  • The ANTHROPIC_API_KEY secret is set

Claude may not make changes if:

  • The issue description is too vague
  • The relevant code cannot be located
  • The fix requires decisions beyond the issue scope

In this case, provide more specific details and re-run.

If the generated PR doesn’t fully solve the problem:

  • Add comments on the PR with specific feedback
  • Close the PR and create a new issue with more details
  • Fix manually and reference the original issue