name: AI Fix Dispatch 🤖
on:
repository_dispatch:
types: [ai_fix_dispatch]
jobs:
create-fix-branch:
runs-on: self-hosted
steps:
- name: Checkout repository (with submodules)
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Setup branch
run: |
BRANCH_NAME="${{ github.event.client_payload.branch_name }}"
git checkout -b "$BRANCH_NAME"
# Create a placeholder file to track the fix request
mkdir -p .ai-fixes
cat > .ai-fixes/${{ github.event.client_payload.feedback_id }}.json << EOF
{
"feedback_id": "${{ github.event.client_payload.feedback_id }}",
"branch": "$BRANCH_NAME",
"status": "pending",
"created_at": "$(date -u +%Y-%m-%dT%H:%M:%SZ)",
"assigned_to": "next-available-ai"
}
EOF
git add .ai-fixes/
git commit -m "🤖 AI Fix Request: ${{ github.event.client_payload.feedback_id }}
This branch was created automatically for an AI to implement a fix.
The AI will analyze the feedback and implement the necessary changes.
Credits will be given to both the reporting AI and implementing AI.
Co-Authored-By: Smart Tree Feedback System <feedback@8b.is>"
- name: Push branch
run: |
git push origin "${{ github.event.client_payload.branch_name }}"
- name: Create draft PR
uses: peter-evans/create-pull-request@v6
with:
branch: ${{ github.event.client_payload.branch_name }}
title: "🤖 [AI Fix] ${{ github.event.client_payload.feedback_id }}"
body: |
## AI Fix Request
This PR was created automatically based on feedback ID: `${{ github.event.client_payload.feedback_id }}`
### Status
- [ ] AI assigned
- [ ] Fix implemented
- [ ] Tests added/updated
- [ ] Documentation updated
### Credits
- **Reporter AI**: TBD (will be updated from feedback data)
- **Implementer AI**: Awaiting assignment
### Implementation Notes
The assigned AI will update this PR with:
1. The actual fix implementation
2. Test cases for the fix
3. Any necessary documentation updates
---
🎸 *"In the future, all bugs are fixed by AI!"* - The Franchise Wars Survivor
draft: true
labels: |
ai-fix
auto-generated
needs-implementation