GitHub Issues Auto-Fix
Fetch GitHub issues, spawn sub-agents to implement fixes and open PRs, then monitor and address PR review comments. Full autonomous issue-to-PR pipeline.
Tags: github, issues, automation, pr, ci-cd
Category: Development
Use Cases
- Nightly bug-fix pipeline: cron triggers issue fetching, agents fix overnight, PRs ready by morning
- Open-source maintenance: auto-fix labeled issues from your community
- Sprint cleanup: batch-process a milestone's issues before a release
- PR review monitoring: automatically address reviewer feedback on open PRs
- Triage + fix: filter by label/assignee to process specific categories
- Hackathon mode: --yes flag for rapid-fire issue resolution
Tips
- Start with `--dry-run` to preview which issues would be picked up
- Use `--label bug` to focus on bug fixes first — they're usually more straightforward for AI
- Combine `--cron` with OpenClaw cron for nightly issue-fixing runs
- Use `--reviews-only` as a separate cron job to address PR review feedback
- The `--fork` flag is essential for open-source contributions — don't push to repos you don't own
- Set `--notify-channel` to get Telegram notifications when PRs are opened
- Use `--model` to pick the best model for your codebase complexity
- Review generated PRs carefully — AI fixes are good starting points but may need refinement
Known Issues & Gotchas
- Requires GH_TOKEN env var with repo scope — OpenClaw injects this automatically if configured
- Uses curl + GitHub REST API, NOT the gh CLI — despite listing gh in requirements
- Sub-agents need a coding agent (Codex, Claude Code, or Pi) installed to implement fixes
- Each sub-agent creates a git worktree — ensure enough disk space for parallel fixes
- Cross-repo PRs (--fork mode) require push access to your fork repo
- --cron mode spawns agents and exits immediately — results come asynchronously
- Rate limits apply: GitHub API has 5,000 requests/hour for authenticated users
- Complex issues may produce low-quality fixes — review PRs before merging
- The --yes flag skips confirmation — use carefully in automated workflows
Alternatives
- GitHub Copilot Workspace
- SWE-Agent
- Devin
- pr-reviewer skill
Community Feedback
Codex -> PR workflow for resolving bugs before you ever even see them. The future of maintenance coding is autonomous agents fixing issues overnight.
— Twitter/X
Setting up an automated PR reviewer CRON job in OpenClaw — the gh-issues skill with --reviews-only and --cron flags lets you check PR comments on a schedule.
— AnswerOverflow (OpenClaw Discord)
OpenClaw Automation: 30 prompts that turn an AI assistant into a 24/7 autonomous companion. The gh-issues workflow is the crown jewel — issues to PRs while you sleep.
— Medium
The pr-reviewer skill complements gh-issues by focusing specifically on reviewing existing PRs rather than creating new ones from issues.
— GitHub Skills Registry
Configuration Examples
Basic issue auto-fix
# Fix up to 5 bug-labeled issues in a repo
/gh-issues owner/repo --label bug --limit 5
# Dry run first
/gh-issues owner/repo --label bug --limit 5 --dry-runOpen-source fork workflow
# Fetch issues from upstream, push fixes to your fork
/gh-issues upstream/repo --fork myuser/repo --label 'good first issue' --limit 3Cron-based nightly pipeline
# In OpenClaw cron job:
/gh-issues owner/repo --label bug --limit 10 --cron --yes --notify-channel -1002381931352
# Separate cron for PR reviews:
/gh-issues owner/repo --reviews-only --cronWatch mode for continuous processing
# Poll every 10 minutes for new issues
/gh-issues owner/repo --watch --interval 10 --label enhancementInstallation
# Requires curl, git, gh CLI + GH_TOKENSource: bundled