Implement multi-AI PR automation with auto-merge and cross-org deployment #4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds comprehensive PR automation across 6 organizations with three AI review systems, intelligent auto-merge, and foundation governance integration.
Implementation
Workflows
Configuration
Cross-Org Deployment
Creates PRs in each repo with reusable workflow reference:
Security Considerations
jqto prevent shell variable injection in heredocsnode_iddynamically for non-PR triggers (check_suite, status events)secrets.*or ephemeral ChittyConnect tokensCost
~$0.023/PR (Claude: $0.003, OpenAI: $0.02, CodeRabbit: included)
Next Steps
ANTHROPIC_API_KEY,OPENAI_API_KEY./deploy-pr-automation.shOriginal prompt
Objective
Implement comprehensive CI/CD automation for pull requests across all organizations (Chittyfoundation, chittyos, chittyapps, chittycorp, furnished-condos, chicagoapps) with AI-powered reviews, auto-labeling, auto-merge, and auto-delete functionality.
Requirements
1. Multi-AI Review System
Create GitHub Actions workflows that integrate three AI review systems:
2. Auto-Labeling
Automatically label PRs based on content analysis:
implementation- New feature implementationsenhancement- Improvements to existing featuresbugfix- Bug fixesdocumentation- Documentation changessecurity- Security-related changesperformance- Performance improvements3. Auto-Merge Logic
PRs should automatically merge when ALL conditions are met:
4. Auto-Delete Branches
Automatically delete source branches after successful merge
5. Integration with chittyfoundation/ops
chittyfoundation/opsrepositoryImplementation Details
GitHub Actions Workflows to Create:
.github/workflows/pr-automation.ymlMain automation workflow that:
.github/workflows/ai-review-claude.ymlClaude-specific review workflow:
.github/workflows/ai-review-codex.ymlOpenAI Codex review workflow:
.github/workflows/auto-merge.ymlAuto-merge workflow:
.github/workflows/auto-delete-branch.ymlBranch cleanup workflow:
.github/workflows/canonical-checks.ymlIntegration with chittyfoundation/ops:
Configuration Files:
.github/coderabbit.ymlCodeRabbit AI configuration:
.github/auto-merge.jsonAuto-merge rules configuration
.github/labeler.ymlAuto-labeling rules based on file patterns
GitHub Secrets Required
The following secrets must be configured in repository settings or organization level:
ANTHROPIC_API_KEY- For Claude API accessOPENAI_API_KEY- For OpenAI Codex accessGITHUB_TOKEN- Automatically provided, used for GitHub API operationsCodeRabbit AI Setup
CodeRabbit should be installed as a GitHub App with permissions:
Branch Protection Rules
Update branch protection to require:
Global Deployment
After testing in chittyos/chittyops, these workflows should be:
.githubrepoSuccess Criteria
Notes
This pull request was created from Copilot chat.
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.