
automate-github-issues
โ 78by google-labs-code ยท part of google-labs-code/jules-skills
Set up automated GitHub issue triage and resolution using parallel Jules coding agents
This is the playbook your agent receives when the skill activates โ you don't need to read it to use the skill, but it's here to audit before installing.
Automate GitHub Issues with Jules
You are setting up a repository to automatically analyze open GitHub issues, plan implementation tasks, and dispatch parallel Jules coding agents to fix them.
What You're Setting Up
A 5-phase automated pipeline that runs via GitHub Actions (or locally):
- Analyze โ Fetch open issues and format as structured markdown
- Plan โ A Jules session performs deep code-level triage and produces self-contained task prompts
- Validate โ Verify no two tasks modify the same file (prevents merge conflicts)
- Dispatch โ Spawn parallel Jules sessions, one per task
- Merge โ Sequential PR merge with CI validation
Customization
Prompt Tuning
The analysis prompt in scripts/fleet/prompts/analyze-issues.ts controls how deeply issues are investigated. Users can adjust:
- Root cause analysis depth
- Solution implementation detail level
- Merge conflict avoidance rules
- File ownership constraints
Issue Filtering
Edit scripts/fleet/github/issues.ts to filter issues by label, milestone, or state.
Resource References
- Architecture Overview โ Detailed explanation of the 5-phase pipeline
npx skills add google-labs-code/jules-skills --skill "automate-github-issues" --full-depthRun this in your project โ your agent picks the skill up automatically.
Setup Steps
Step 1: Copy fleet scripts to the repository
Copy the entire scripts/ directory from this skill into the target repository at scripts/fleet/:
Target structure:
scripts/fleet/
โโโ fleet-analyze.ts
โโโ fleet-plan.ts
โโโ fleet-dispatch.ts
โโโ fleet-merge.ts
โโโ types.ts
โโโ prompts/
โ โโโ analyze-issues.ts
โ โโโ bootstrap.ts
โโโ github/
โโโ git.ts
โโโ issues.ts
โโโ markdown.ts
โโโ cache-plugin.tsImportant: Preserve the directory structure exactly. The scripts use relative imports between files.
Step 2: Copy workflow templates
Copy the workflow files from assets/ to the repository's .github/workflows/ directory:
assets/fleet-dispatch.ymlโ.github/workflows/fleet-dispatch.ymlassets/fleet-merge.ymlโ.github/workflows/fleet-merge.yml
Step 3: Create a package.json for the fleet scripts
Create scripts/fleet/package.json with the required dependencies:
{
"name": "fleet-scripts",
"private": true,
"type": "module",
"dependencies": {
"@google/jules-sdk": "^0.1.0",
"octokit": "^4.1.0",
"find-up": "^7.0.0"
},
"devDependencies": {
"@types/bun": "^1.2.0"
}
}Step 4: Create environment template
Copy assets/.env.example to the repository root.
Step 5: Install dependencies
cd scripts/fleet && bun installStep 6: Print next steps for the user
Tell the user they need to:
- Add
JULES_API_KEYas a GitHub repository secret (Settings โ Secrets โ Actions) GITHUB_TOKENis provided automatically by GitHub Actions- Customize the cron schedule in
.github/workflows/fleet-dispatch.yml(default: daily 6am UTC) - Commit all generated files
Manual Usage
After setup, the user can run the pipeline locally:
cd scripts/fleet
# Fetch open issues
bun fleet-analyze.ts
# Plan tasks (creates a Jules planning session)
JULES_API_KEY=<key> bun fleet-plan.ts
# Dispatch parallel agents
JULES_API_KEY=<key> bun fleet-dispatch.ts
# Merge PRs sequentially
GITHUB_TOKEN=<token> bun fleet-merge.tsTroubleshooting
- "Unable to parse git remote URL": Ensure the repo has a valid GitHub remote (
git remote get-url origin) - Ownership conflict errors: Two tasks claim the same file. Adjust the task JSON or merge them manually.
- CI timeout during merge: Increase
maxWaitMsinfleet-merge.ts(default: 10 minutes) - Bun not found: Install Bun:
curl -fsSL https://bun.sh/install | bash
Licensed under Apache-2.0โ you can use, modify, and redistribute it under that license's terms.
View the full license file on GitHub โ