Apollo now has complete GitHub repository integration, allowing users to interact with their selected repository through natural conversation without needing to clone or download it.
GITHUB_INTEGRATION_GUIDE.md- Comprehensive user guideGITHUB_ASSISTANT_INSTRUCTIONS.md- AI system instructionssrc/routes/api/github/+server.ts- REST API for GitHub operations
-
src/lib/github-helpers.ts- Added 8 new GitHub functions:getRepositorySummary()- Get repo info, stats, and READMElistGitHubIssues()- List issues with filteringcreateGitHubIssue()- Create new issuesupdateGitHubIssue()- Update existing issuesaddIssueComment()- Add comments to issuessearchRepositoryCode()- Search code in repogetRepositoryTree()- Get file tree structure- Plus enhanced types and interfaces
-
src/routes/api/voice/+server.ts- Enhanced WebSocket server:- Added GitHub tools (functions) to OpenAI session
- Implemented tool call handling
- Added GitHub operation execution
- Enhanced system prompts
-
src/lib/LiveChat.svelte- UI enhancements:- Added GitHub event handlers
- Added system message support for notifications
- Added success/error feedback for GitHub operations
- Enhanced styling for system messages
Apollo can now call GitHub functions directly:
- get_repository_summary - Analyze repository
- list_issues - View issues
- create_issue - Create new issues
- search_code - Find code patterns
- add_issue_comment - Comment on issues
Users can simply ask:
- "Summarize this repository"
- "Create an issue for adding dark mode"
- "Search for authentication code"
- "List open issues"
- Loading indicators when processing
- Success notifications (e.g., "✅ Created issue #42")
- System messages shown in chat
- Error handling with clear messages
- Uses GitHub API instead of git clone
- Loads repository context on connection
- Searches code via API
- All operations through authenticated API calls
User Request
↓
Apollo AI (OpenAI Realtime API)
↓
Tool Call (function_call_arguments.done)
↓
WebSocket Server Handler
↓
GitHub Helper Function
↓
GitHub API (Octokit)
↓
Result returned to AI
↓
AI responds to user
↓
UI shows notification
- User: "Create an issue for adding dark mode"
- Apollo AI: Asks clarifying questions
- User: Provides details
- Apollo AI: Calls
create_issuetool - Server: Executes
createGitHubIssue() - GitHub API: Creates the issue
- Server: Returns issue data to AI
- UI: Shows "✅ Created issue #42"
- Apollo AI: Confirms to user
{
type: 'function',
name: 'create_issue',
description: 'Create a new GitHub issue',
parameters: {
type: 'object',
properties: {
title: { type: 'string' },
body: { type: 'string' },
labels: { type: 'array' }
},
required: ['title', 'body']
}
}case 'create_issue':
result = await createGitHubIssue(
accessToken,
owner,
repo,
args.title,
args.body,
args.labels
);
// Notify client
clientWs.send({
type: 'github.issue_created',
issue: result
});
break;case 'github.issue_created':
addTranscript('system',
`✅ Created issue #${data.issue.number}: ${data.issue.title}`
);
break;- No Git Clone Required - Work with repos without downloading
- Natural Interaction - Conversational interface for GitHub
- Guided Issue Creation - AI helps format and structure issues
- Real-time Feedback - Immediate confirmation of actions
- Repository Context - AI understands your codebase
- Best Practices - Follows Agile/INVEST principles
To test the implementation:
-
Start the app:
npm run dev
-
Select a repository using the repo selector
-
Try these commands:
- "Summarize this repository"
- "Create an issue for adding tests"
- "List the open issues"
- "Search for error handling"
-
Verify:
- Repository context loads
- AI understands the repo
- Issues are created successfully
- Success notifications appear
Potential enhancements:
- Pull request management
- Code review assistance
- Branch operations
- Commit analysis
- CI/CD integration
- Project board sync
apollo-app-sveltekit/
├── src/
│ ├── lib/
│ │ ├── github-helpers.ts [ENHANCED]
│ │ └── LiveChat.svelte [ENHANCED]
│ └── routes/
│ └── api/
│ ├── github/
│ │ └── +server.ts [NEW]
│ └── voice/
│ └── +server.ts [ENHANCED]
├── GITHUB_INTEGRATION_GUIDE.md [NEW]
├── GITHUB_ASSISTANT_INSTRUCTIONS.md [NEW]
└── IMPLEMENTATION_SUMMARY.md [NEW]
Apollo now provides a complete GitHub integration that allows users to work with their repositories through natural conversation. The implementation uses OpenAI's function calling (tools) to enable the AI to directly interact with GitHub's API, making repository management intuitive and efficient.
Users can now: Work with any GitHub repository without cloning it, create high-quality issues through conversation, search and analyze code naturally, and manage issues seamlessly - all while enjoying real-time feedback and guidance from Apollo.