GitHub Sync
Import and sync documentation from GitHub repositories into your Knowledge Base.
GitHub Sync
Connect your GitHub account to import documentation directly from your repositories into the Workestra Knowledge Base. This is perfect for teams that already maintain docs in GitHub.
Screenshot needed � add an annotated image showing this UI
Prerequisites
Before you begin, ensure you have:
- A GitHub account (personal or organization)
- Access to repositories containing documentation
- Repositories should contain markdown (
.mdor.mdx) files - Appropriate permissions to install GitHub apps or OAuth integrations
Connecting GitHub
Step 1: Start the Connection
- Navigate to Knowledge Base in the sidebar
- Click the ... (more actions) menu in the top right
- Select Import from GitHub
- The GitHub OAuth modal opens
Step 2: Authorize Workestra
- Review the permissions Workestra is requesting:
- Read repositories — To list and access your repos
- Read repository contents — To import markdown files
- Click Authorize Workestra
- If prompted, sign in to your GitHub account
Workestra only requests read access. We cannot modify or delete your GitHub repositories.
Step 3: Select Repositories
After authorization:
- You'll see a list of accessible repositories
- Use the search box to find specific repos
- Select the repository containing your documentation
- Choose the branch (usually
main,master, ordocs)
Step 4: Select Files and Folders
Drill down into the repository to select what to import:
- Navigate through the folder structure
- Check folders to import entire directories
- Or check individual files for selective import
- Common documentation folders:
/docs,/wiki,/guides
You don't need to import everything at once. Start with your most important documentation and add more later.
How Sync Works
The Sync Process
When you import from GitHub:
- Edge Function Activation — The
sync-github-docsedge function processes your request - File Fetching — Markdown files are retrieved from GitHub's API
- Content Conversion — Files are converted to Knowledge Base documents
- Metadata Extraction — Frontmatter (YAML headers) is parsed
- Document Creation — Documents are created in your Knowledge Base
What's Imported
| Element | How It's Handled |
|---|---|
| File content | Converted to document body |
| Frontmatter | Parsed as metadata (title, tags, etc.) |
| Folder structure | Preserved as document tags |
| Images | Referenced by URL (not uploaded) |
| Relative links | Converted to Knowledge Base links when possible |
Supported File Types
.md— Markdown files.mdx— MDX files (JSX components are stripped)
Other file types are ignored during import.
After Import
Where Documents Appear
Imported documents appear in your Knowledge Base with:
- Title — From frontmatter
titleor filename - Tags — From frontmatter
tags+ folder path - Scope — Based on your import selection (workspace/team)
- Source — "GitHub" indicator shows it was imported
Editing Imported Documents
You can edit imported documents just like any other Knowledge Base doc:
- Changes are saved in Workestra
- Changes do not sync back to GitHub
- The original GitHub file remains unchanged
Currently, sync is one-way only (GitHub → Workestra). Edits in Workestra won't update your GitHub repository.
Re-Syncing After Changes
If your GitHub documentation changes and you want to update Workestra:
Option 1: Re-Import
- Delete the existing imported documents (optional)
- Run the import process again
- New documents will be created with the latest content
Option 2: Manual Update
For small changes, it may be easier to:
- View the updated file on GitHub
- Copy the new content
- Paste into the existing Workestra document
Troubleshooting
Permission Issues
Problem: Private repositories don't appear in the list
Solutions:
- Ensure you granted access to private repositories during OAuth
- For organization repos, an admin may need to approve the app
- Check that your GitHub token has
reposcope
Import Failures
Problem: Files aren't importing
Solutions:
- Verify files have
.mdor.mdxextensions - Check that files are under 1MB (large files may timeout)
- Ensure the branch name is correct
Formatting Problems
Problem: Documents don't look right after import
Solutions:
- GitHub-flavored markdown tables should convert correctly
- Complex HTML in markdown may not render perfectly
- Embedded scripts and iframes are stripped for security
Rate Limits
GitHub API rate limits apply:
- Unauthenticated: 60 requests/hour
- Authenticated: 5,000 requests/hour
Large imports may hit these limits. If you see rate limit errors:
- Wait an hour and try again
- Import in smaller batches
- Contact support for enterprise assistance
Security & Privacy
Data Handling
- Repository contents are fetched directly to your workspace
- We don't store your GitHub credentials
- Access tokens are encrypted and scoped
- Imported content follows your workspace's security settings
Revoking Access
To disconnect GitHub:
- Go to Settings > Connected Accounts
- Find GitHub in the list
- Click Disconnect
- Or revoke access from your GitHub account settings
Disconnecting GitHub stops future imports. Previously imported documents remain in your Knowledge Base.
Best Practices
Organize Before Importing
- Clean up your GitHub docs folder structure
- Remove outdated or draft files
- Ensure frontmatter is consistent
- Use meaningful filenames
Example Frontmatter
---
title: Onboarding Guide
description: Steps for new team members
tags: [hr, onboarding, getting-started]
author: Jane Doe
date: 2024-03-15
---Maintain a Single Source of Truth
Decide on your primary documentation location:
- GitHub as source: Regularly re-import to Workestra
- Workestra as source: Edit docs in Workestra, reference from GitHub
Next Steps
- Knowledge Base — Learn more about managing documents
- Connected Accounts — Manage your GitHub connection
Knowledge Base
Create, organize, and search your team's documentation with AI-powered semantic search and GitHub sync.
Time Tracking
Composer-first timer, three views over the same week, calendar import, profitability, multi-level approvals, goals — Workestra's all-in-one replacement for Toggl, Harvest, and Clockify.