GitHub-Linear Bidirectional Sync
Synchronizes issues bidirectionally between GitHub and Linear. Creates linked issues, syncs status changes, and keeps labels/assignees in sync. Essential for teams using Linear for planning but GitHub for code review.
Command
/sync-github-linear
Description
Establishes and maintains bidirectional synchronization between GitHub Issues and Linear tasks. When an issue is updated in either platform, the corresponding item in the other platform is updated to match. Supports status mapping, label sync, and assignee linking.
Behavior
- Initial Setup -- Configures the mapping between GitHub repo and Linear team/project
- Status Mapping -- Maps GitHub issue states and labels to Linear workflow states
- Sync Operations:
- Create: New GitHub issue creates a Linear task (and vice versa)
- Status: Closing a GitHub issue moves the Linear task to "Done"
- Labels: Maps GitHub labels to Linear labels
- Assignees: Links GitHub usernames to Linear user accounts
- Comments: Syncs comments bidirectionally with source attribution
- Conflict Resolution -- Last-write-wins with configurable priority (Linear or GitHub as source of truth)
Output Format
Sync Configuration (.github/linear-sync.yml)
linear: team_key: "ENG" project: "Q1 Sprint" api_key_env: "LINEAR_API_KEY" github: repo: "org/repo-name" token_env: "GITHUB_TOKEN" status_mapping: github_to_linear: open: "In Progress" closed: "Done" labels_to_status: "in-review": "In Review" "blocked": "Blocked" "backlog": "Backlog" label_mapping: "bug": "Bug" "feature": "Feature" "tech-debt": "Improvement" assignee_mapping: github_username: "linear_display_name" sync_options: direction: "bidirectional" # or "github-to-linear" or "linear-to-github" conflict_resolution: "linear-wins" sync_comments: true sync_labels: true create_backlinks: true
Sync Report
## Sync Summary | Direction | Created | Updated | Conflicts | Errors | |-----------|---------|---------|-----------|--------| | GitHub ā Linear | 3 | 7 | 0 | 0 | | Linear ā GitHub | 1 | 4 | 1 | 0 | ### Conflicts Resolved - ENG-142 / #87: Status conflict (Linear: "In Review", GitHub: "open") ā Used Linear value ### Backlinks Created - #91 ā ENG-156: "Add user export feature" - #92 ā ENG-157: "Fix pagination on dashboard"
Examples
/sync-github-linear --setup # Initial configuration wizard
/sync-github-linear # Run sync with existing config
/sync-github-linear --dry-run # Preview changes without applying
/sync-github-linear --since "2025-03-01" # Sync only recent changes
/sync-github-linear --issue ENG-142 # Sync a specific Linear issue
Reviews
No reviews yet. Be the first to review this template!
Similar Templates
Git Commit Message Generator
Generates well-structured conventional commit messages by analyzing staged changes. Follows Conventional Commits spec with scope detection.
React Component Scaffolder
Scaffolds a complete React component with TypeScript types, Tailwind styles, Storybook stories, and unit tests. Follows project conventions automatically.
CI/CD Pipeline Generator
Generates GitHub Actions workflows for CI/CD including linting, testing, building, and deploying. Detects project stack automatically.