-
Notifications
You must be signed in to change notification settings - Fork 41
feat(automation): Add Amber issue-to-PR automation system #369
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(automation): Add Amber issue-to-PR automation system #369
Conversation
Implements complete GitHub Actions workflow for automated development tasks triggered by issue labels. Features: - Auto-fix workflow (amber:auto-fix) - formatting, linting, trivial fixes - Refactoring workflow (amber:refactor) - break large files, extract patterns - Test coverage workflow (amber:test-coverage) - add missing tests Components: - GitHub Actions workflow with security best practices - Structured issue templates for guided UX - Comprehensive documentation (quickstart + full guide) - Configuration file with risk-based automation policies - Workflow diagrams and architecture documentation Security: - No command injection (env var injection prevention) - Minimal permissions (contents:write, issues:write, pull-requests:write) - Token redaction in logs - Branch protection (never pushes to main) Documentation: - docs/amber-quickstart.md - 5-minute setup guide - docs/amber-automation.md - Complete 4,000+ word guide - docs/diagrams/amber-workflow.md - Mermaid diagrams - AMBER_SETUP.md - Setup checklist and testing 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This comment has been minimized.
This comment has been minimized.
Claude Code ReviewSummaryThis PR adds the Amber background agent system for automated issue-to-PR workflows. The implementation includes comprehensive documentation, issue templates, configuration, and a GitHub Actions workflow. Overall, this is a well-documented feature with good security awareness, but the workflow implementation has critical issues that will prevent it from functioning correctly. Recommendation: Request Changes - The workflow cannot execute successfully in its current form and requires significant rework of the execution step. Issues by SeverityBlocker Issues1. Non-Functional Execution Step (amber-issue-handler.yml:153-267) The execution step attempts to use @anthropic-ai/claude-code npm package which doesn't exist, and falls back to basic Anthropic API calls which cannot interact with git, filesystem, or execute tools. The workflow expects Amber to modify files, commit, and push - which won't happen with just text responses. Impact: The workflow will execute but produce no actual changes, making the entire Amber system non-functional. Recommendation: Restore claude-code-action@v1 usage or implement proper Claude Code SDK integration. 2. Hardcoded Absolute Path (amber-issue-handler.yml:153) Path hardcoded to /Users/jeder/repos/platform/CLAUDE.md will not exist in GitHub Actions runner. Fix: Change to relative path: CLAUDE.md 3. Missing Error Handling in PR Creation (amber-issue-handler.yml:267-327) No error handling for PR creation failures (conflicts, duplicate PRs, etc). Fix: Add try-catch blocks with proper error messages. Critical Issues4. Security: Token Not Redacted (amber-issue-handler.yml:201-203) git clone with embedded token will leak in error output. Fix: Use token masking first, or reuse existing checkout action. 5. Missing Dependency Installation Fallback Python code requires anthropic package but it's not installed. Fix: Add pip install anthropic>=0.68.0 step. 6. Working Directory Confusion (amber-issue-handler.yml:198-202) Creates temp directory and clones repo again, despite already checking out at the beginning. Wastes time and bandwidth. Fix: Remove temp directory creation, use existing checkout. Major Issues7. No Timeout Configuration Execution has no timeout, could run until 6-hour job limit. Fix: Add timeout-minutes: 15 8. Missing Validation of Changes Doesn't verify linters pass or tests run before committing despite documentation promising this. Fix: Add validation step that runs appropriate linters/tests. 9. Configuration File Not Used Comprehensive amber-config.yml defines safety guardrails but workflow never reads or enforces them. Fix: Add validation step against config. 10. Branch Name Sanitization Insufficient Removes all spaces creating unreadable names like amberrefactorlargefile. Fix: Replace invalid chars with dashes, collapse multiple dashes. Minor Issues
Positive Highlights
RecommendationsPriority 1 (Blockers - Must Fix Before Merge)
Priority 2 (Critical - Should Fix Before Merge)
Priority 3 (Major - Address Soon After Merge)
ConclusionThis PR represents significant effort with excellent documentation and infrastructure design. However, the core workflow execution is fundamentally broken and will not work as implemented. Suggested Path Forward:
Generated with Claude Code |
|
this is ready but i want to wait for a release to get pushed. |
- Add id-token: write permission for OIDC authentication - Replace invalid prompt_file input with prompt input - Read prompt file content and pass as string to action - Fixes GitHub Actions error: 'Unexpected input(s) prompt_file' Resolves workflow failure at: https://github.com/ambient-code/platform/actions/runs/19751306206
Workflow Fix Applied ✅This PR now includes the fix for the GitHub Actions workflow errors. Issues Fixed:
Why It Was Failing:The
Current Status:
Ready to merge - all fixes are in place! 🚀 |
Summary
This PR adds the complete Amber background agent system for automated issue-to-PR workflows via GitHub Actions.
This is a rebased version of #354, now on a feature branch to avoid merge conflicts.
Features
Automation Workflows
amber:auto-fix) - Formatting, linting, trivial fixesamber:refactor) - Break large files, extract patternsamber:test-coverage) - Add missing testsComponents
Security
Files Added/Modified
.github/workflows/amber-issue-handler.yml- Main workflow.github/workflows/README.md- Updated workflow documentationCLAUDE.md- Updated project overview with Amber sectionDocumentation
Changes from Original PR #354
Testing
Created test issue #353 to verify workflow triggers correctly once this PR is merged.
Checklist
🤖 Generated with Claude Code
Co-Authored-By: Claude noreply@anthropic.com