-
Notifications
You must be signed in to change notification settings - Fork 49
Open
Description
Overview
Enable organization members to trigger automated code fixes by commenting @euni-bot /fix on issues or PRs. The GitHub App webhook should call the FastAPI backend, run the euni agent for code repair, and open a PR with results.
Tasks
-
Configuration
- Add
GH_APP_ID,GH_WEBHOOK_SECRET,GH_APP_PRIVATE_KEY,BOT_HANDLE,ORG_NAMEto.envand load viaconfiguration/github.py.
- Add
-
Utils
- Implement signature verification, JWT creation, and command parsing in
utils/github_sec.py.
- Implement signature verification, JWT creation, and command parsing in
-
GitHub Service Layer
-
Add
git/github_service.pyfor:- Installation token retrieval
- Org membership check
- Comment posting/updating
- Branch creation + commit + PR creation
-
-
AI Fix Logic
- Add
app/services/euni_fix.pywithrun_euni_fix(repo_dir, args)(placeholder for real AI/MCP integration).
- Add
-
Webhook Route
-
Add
app/routes/github_webhook.py:- Validate webhook signature
- Detect
@BOT_HANDLE /fix - Post placeholder comment
- Run background fix → commit → PR → update comment
-
-
App Initialization
- Register webhook router in
app/__init__.py.
- Register webhook router in
-
Deployment
- Update
docker-compose.ymlwith env vars anduvicorncommand. - Configure Nginx reverse proxy for
/github/webhookwith SSL.
- Update
-
Testing
- Add
tests/app/test_github_webhook.py(mock payload, check command parsing & response flow).
- Add
Acceptance Criteria
-
When a member comments
@euni-bot /fix:- Bot posts a “started” placeholder.
- After fix, bot updates comment with PR link and short summary.
-
Only members of
ORG_NAMEcan trigger the command. -
Errors are handled gracefully with a failure comment.
Metadata
Metadata
Assignees
Labels
No labels