Feat: multi-team sync — sync multiple Linear teams into separate vault folders#8
Open
richardbowman wants to merge 1 commit into
Open
Feat: multi-team sync — sync multiple Linear teams into separate vault folders#8richardbowman wants to merge 1 commit into
richardbowman wants to merge 1 commit into
Conversation
…t folders Closes casals#2 Previously the plugin could only sync a single Linear team into a single vault folder, requiring users to manually switch the default team to work across projects. This change adds a TeamSyncConfig[] setting that lets users configure any number of Linear teams, each mapped to its own vault folder. Syncing runs a full pull for every enabled team in one operation. Changes: - types.ts: Add TeamSyncConfig interface; add teamSyncConfigs[] to LinearPluginSettings with backward-compatible legacy teamId/syncFolder fallback - sync-manager.ts: syncAll() loops over teamSyncConfigs and syncs each team into its designated folder; skips lastSyncTime filter for multi-team mode so all issues are always present; ensureSyncFolder/ findOrCreateNoteForIssue accept folder path as a parameter - settings-tab.ts: New "Team sync" section with per-team rows (name, folder path, enable toggle, remove button) and an "+ Add team" modal that auto-loads teams from the Linear API - main.ts: Sync command now shows toast notifications with created/updated counts and error summary - README.md: Document multi-team sync setup and example folder layout; add TeamSyncConfigs to settings table Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #2
Problem
The plugin previously supported only a single Linear team synced into a single vault folder. Users working across multiple projects had to manually swap the default team setting and re-sync each time — making Obsidian impractical as a primary workspace for multi-project workflows.
Solution
This PR adds a
teamSyncConfigs[]setting that lets users configure any number of Linear teams, each mapped to its own vault folder. A single Sync Linear Issues command syncs all enabled teams in one operation.Example vault layout after sync:
Changes
src/models/types.tsTeamSyncConfiginterface (teamId,teamName,teamKey,syncFolder,enabled)teamSyncConfigs: TeamSyncConfig[]toLinearPluginSettingsteamId+syncFolderfields retained as fallbacksrc/sync/sync-manager.tssyncAll()loops over enabled team configs, syncing each into its designated folderteamSyncConfigsis emptylastSyncTimefilter so all issues are always fully present per folderensureSyncFolder()andfindOrCreateNoteForIssue()now accept folder path as a parametersrc/ui/settings-tab.tsmain.tssync-linear-issuescommand now shows toast notifications: "Syncing..." on start, count summary on completion, and error count if anything failsREADME.mdteamSyncConfigsadded to the settings reference tableBackward Compatibility & Migration
No action required for existing users: If
teamSyncConfigsis empty (the default), the plugin falls back to the legacyteamId+syncFolderbehavior with no change in behavior.Migrating to multi-team sync: When a user adds team sync configs, new notes are created in the configured subfolder. However,
findOrCreateNoteForIssueonly searches within the new team folder — so existing notes in the old flat folder will not be found and duplicates will be created. Users migrating from single-team to multi-team should either:A future improvement could be a one-time migration helper that moves existing Linear notes into the appropriate team subfolder automatically. Happy to add that if the maintainer considers it a blocker.
Testing
Tested with 2 teams (Golden Wealth + RB Code Labs) syncing 35 and 4 issues respectively into separate vault folders. Verified:
.mdnotes with correct frontmatter🤖 Generated with Claude Code