A powerful GitHub Action that provides bi-directional synchronization between GitHub and GitLab repositories. Keep your projects in sync across platforms automatically.
- π Bi-directional sync between GitHub and GitLab
- π³ Branches, PRs/MRs, issues, releases, and tags
- π¬ Enhanced comment synchronization with proper attribution
- π€ Smart bot branch handling - configurable cleanup of dependabot, renovate, and other bot branches
- βοΈ Highly configurable with logical priority-based defaults
- π Secure with token-based authentication
- π·οΈ Smart labeling of synced content
- π§ Intelligent dependency management - automatically enables required features
- β±οΈ Chronological sync order - respects dependencies between operations
- ποΈ Automatic repository creation - creates missing remote repositories as private by default
Create .github/workflows/sync.yml:
name: Sync to GitLab
on:
push:
branches: [main]
pull_request:
types: [opened, closed, reopened]
issues:
types: [opened, closed, reopened]
release:
types: [published]
schedule:
- cron: '0 */6 * * *'
workflow_dispatch:
jobs:
sync:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
issues: write
steps:
- name: Checkout Repository
uses: actions/[email protected]
- name: Sync with GitLab
uses: OpenSaucedHub/[email protected]
with:
GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}Add these secrets to your GitHub repository:
GITLAB_TOKEN: GitLab personal access token withapiscopeGH_TOKEN: GitHub personal access token withworkflowscope (required for syncing workflow files)
Warning
If your sync includes workflow files (.github/workflows/), you must use a Personal Access
Token with the workflow scope instead of the default GITHUB_TOKEN. The default token cannot
modify workflow files for security reasons.
Create .github/sync-config.yml for custom settings:
gitlab:
enabled: true
projectId: 12345 # Your GitLab project ID
github:
enabled: trueThat's it! The action uses intelligent defaults:
- β Enabled by default: Branches (with history sync), Tags, Releases
- β Disabled by default: Pull Requests, Issues, Comments (can be noisy)
- π§ Smart dependencies: Automatically enables required features (e.g., tags when releases are enabled)
π
For detailed configuration and advanced usage:
- Configuration Guide - Complete configuration options and examples
- Token Setup - Detailed token permissions and setup instructions
- Advanced Examples - Complex configuration scenarios
- Troubleshooting - Common issues and solutions
- π Configuration Examples - Ready-to-use configuration templates
- π Report Issues - Found a bug or have a feature request?
- π¬ Discussions - Ask questions and share ideas
We welcome contributions! Please see our Contributing Guide for details.
MIT License - see the LICENSE file for details.
Built with β€οΈ using TypeScript and Bun
Inspired by the need for seamless cross-platform development workflows