GitHub Integration

Connect your GitHub repositories to Vectly for intelligent code understanding and assistance.

Last Updated: 5/27/2025

GitHub Integration

Vectly's GitHub integration brings your code directly into AI conversations, enabling intelligent code analysis, documentation generation, and development assistance. Connect your repositories to give AI deep understanding of your codebase.

Overview

What GitHub Integration Provides

  • Full Repository Context: AI understands your entire codebase
  • Intelligent Code Search: Find functions, implementations, patterns
  • Cross-File Understanding: Track dependencies and relationships
  • Version Awareness: Work with different branches and commits
  • Automatic Syncing: Stay updated with latest changes

Key Benefits

  • Answer questions about your code instantly
  • Generate documentation from source
  • Find bugs and suggest improvements
  • Understand complex architectures
  • Accelerate onboarding for new developers

Getting Started

Initial Setup

1. Install GitHub App

  1. Go to Project Settings
  2. Click "Connect GitHub Repository"
  3. You'll be redirected to GitHub
  4. Click "Install" on the Vectly app
  5. Choose repositories to grant access

2. Authorization Levels

  • Selected Repositories: Choose specific repos
  • All Repositories: Grant access to all (not recommended)
  • Organization Access: Requires org admin approval

3. Return to Vectly

After installation:

  1. Automatically redirected back
  2. See available repositories
  3. Select repos to connect
  4. Configure each repository

Connecting Repositories

Repository Selection

  1. Choose Project: Select destination project
  2. Pick Repositories: Check repos to connect
  3. Set Patterns: Configure file inclusion
  4. Connect: Finish setup

Multiple Organizations

  • Install app on each organization
  • Manage separately
  • Different permissions possible
  • Centralized in Vectly

Configuration Options

File Patterns

Control exactly what gets indexed using glob patterns:

Include Patterns

Specify files to include:

# Include all Python files
**/*.py

# Include specific directories
src/**/*
lib/**/*

# Include by extension
**/*.{js,jsx,ts,tsx}

# Include documentation
docs/**/*.md
README.md

Exclude Patterns

Prevent indexing of:

# Dependencies
node_modules/
vendor/
venv/

# Build outputs
dist/
build/
*.min.js

# Sensitive files
.env
*.key
secrets/

# Test files (optional)
**/*.test.js
__tests__/

Branch Management

Default Branch

  • Automatically detected
  • Usually main or master
  • Can be changed anytime
  • Affects all queries

Working with Branches

  1. Go to repository settings
  2. Select different branch
  3. Re-sync if needed
  4. AI uses branch context

Feature Branch Workflow

  • Connect feature branches
  • Compare implementations
  • Review changes
  • Merge confidence

Sync Settings

Manual Sync

When to use:

  • Force refresh
  • After major changes
  • Troubleshooting
  • Initial setup

How to sync:

  1. Go to GitHub tab
  2. Find repository
  3. Click "Sync Now"
  4. Monitor progress

Using GitHub Context

In Conversations

Direct Questions

Ask about your code naturally:

"How does the authentication system work?"
"Find all API endpoints"
"Where is user validation handled?"
"What does the PaymentService class do?"

Code Analysis

Request analysis and improvements:

"Review the error handling in auth.js"
"Find potential security issues"
"Suggest performance optimizations"
"Check for code duplication"

Documentation

Generate docs from code:

"Create API documentation for user endpoints"
"Write a README for the auth module"
"Document the database schema"
"Explain the architecture"

Best Practices

1. Specific Queries

  • Reference file names when known
  • Use function/class names
  • Mention specific features
  • Provide context

2. Incremental Understanding

  • Start with overview questions
  • Drill down into specifics
  • Build mental model
  • Cross-reference findings

3. Code Navigation

"Show me the main entry point"
"What calls the processPayment function?"
"Find all database queries"
"Trace the user login flow"

Advanced Features

Multi-Repository Projects

Setup

  1. Connect multiple repositories
  2. Organize by component
  3. AI understands relationships
  4. Query across repos

Use Cases

  • Microservices architecture
  • Frontend/backend splits
  • Library dependencies
  • Monorepo alternatives

Code Intelligence

Semantic Understanding

  • Function relationships
  • Class hierarchies
  • Module dependencies
  • API contracts

Pattern Recognition

  • Coding standards
  • Common patterns
  • Anti-patterns
  • Best practices

Change Tracking

  • Recent modifications
  • Commit history context
  • Author information
  • Evolution understanding

Integration with RAG

How It Works

  1. Code files are chunked intelligently
  2. Preserves context and structure
  3. Creates semantic embeddings
  4. Enables similarity search

Optimization

  • Comments improve understanding
  • Documentation helps context
  • Clear naming assists retrieval
  • Structure matters

Security & Privacy

Data Protection

What's Stored

  • File contents (indexed)
  • File structure
  • Commit metadata
  • Branch information

What's NOT Stored

  • Git history (full)
  • Credentials/secrets
  • Binary files
  • Excluded patterns

Access Control

Repository Level

  • Only repos you authorize
  • Revocable anytime
  • Audit trail available
  • Organization policies respected

Vectly Level

  • Project isolation
  • User-specific access
  • No cross-contamination
  • Secure processing

Best Practices

Security Guidelines

  1. Never commit secrets: Use environment variables
  2. Exclude sensitive files: Update .gitignore
  3. Review permissions: Minimal necessary access
  4. Monitor access: Check audit logs
  5. Rotate tokens: If exposed

Privacy Considerations

  • Code remains private
  • No training on your code
  • Isolated processing
  • Deletable anytime

Troubleshooting

Common Issues

Repository Not Syncing

Symptoms: No updates, old code Solutions:

  1. Check webhook configuration
  2. Verify app permissions
  3. Manual sync attempt
  4. Re-connect repository

Files Missing

Symptoms: Can't find expected files Solutions:

  1. Review include patterns
  2. Check exclude patterns
  3. Verify branch selection
  4. Look for .gitignore conflicts

Slow Performance

Symptoms: Long query times Solutions:

  1. Optimize file patterns
  2. Reduce repository size
  3. Exclude large files
  4. Use specific queries

GitHub App Issues

Installation Problems

  • Clear browser cache
  • Try different browser
  • Check organization settings
  • Contact support

Permission Errors

  • Verify repository access
  • Check organization requirements
  • Review app permissions
  • Re-install if needed

Use Case Examples

Code Review Assistant

Setup: Connect main repository
Query: "Review the changes in the last commit"
Result: AI analyzes changes, suggests improvements

Documentation Generator

Setup: Connect project repos
Query: "Generate API documentation"
Result: Complete API docs with examples

Bug Hunter

Setup: Connect codebase
Query: "Find potential null pointer exceptions"
Result: List of risky code sections

Architecture Explainer

Setup: Connect all services
Query: "Explain how services communicate"
Result: Clear architecture overview

Onboarding Assistant

Setup: Connect team repos
Query: "How do I set up the development environment?"
Result: Step-by-step guide from README and code

Limitations

Current Limitations

  • File size limits (10MB per file)
  • Repository size limits (varies by plan)
  • Sync frequency limits
  • Query complexity bounds

Not Supported

  • Binary file analysis
  • Git submodules (yet)
  • Private npm packages
  • Direct Git operations

Future Enhancements

Coming Soon

  • Pull request integration
  • Issue tracking connection
  • Commit message analysis
  • Code review workflows
  • CI/CD integration
  • Team collaboration

Roadmap

  • Real-time collaboration
  • IDE extensions
  • Automated documentation
  • Code generation
  • Security scanning

Tips for Success

Do's ✅

  • Keep repos well-organized
  • Use clear file names
  • Add helpful comments
  • Update documentation
  • Configure patterns carefully
  • Monitor sync status
  • Ask specific questions

Don'ts ❌

  • Connect unnecessary repos
  • Include sensitive data
  • Ignore security warnings
  • Use overly broad patterns
  • Sync massive repositories
  • Share access tokens
  • Commit credentials

GitHub integration transforms Vectly into your intelligent coding assistant, understanding your code as deeply as you do.