feat: multi-project/team support for Linear, Jira, and ADO#2806
Closed
harry-miller-trimble wants to merge 1 commit intosteveyegge:mainfrom
Closed
feat: multi-project/team support for Linear, Jira, and ADO#2806harry-miller-trimble wants to merge 1 commit intosteveyegge:mainfrom
harry-miller-trimble wants to merge 1 commit intosteveyegge:mainfrom
Conversation
Add support for syncing issues across multiple projects/teams in all three tracker integrations, with shared infrastructure to avoid duplicating logic. Shared infrastructure (internal/tracker/multiproject.go): - ParseCommaSeparated: splits comma-separated config values - DeduplicateStrings: removes duplicates preserving order - ResolveProjectIDs: config precedence (CLI > plural > singular) Linear (closes steveyegge#2791): - Tracker: map[string]*Client with per-team routing - FetchIssues iterates all teams, deduplicates by issue ID - UpdateIssue routes to owning team via FetchIssueByIdentifier - Config: linear.team_ids / LINEAR_TEAM_IDS + --team flag Jira: - projectKey string → projectKeys []string - FetchIssues uses JQL IN clause (single query, no iteration) - Config: jira.projects / JIRA_PROJECTS + --project flag ADO: - project string → projects []string - WIQL uses TeamProject IN clause (single query) - Config: ado.projects / AZURE_DEVOPS_PROJECTS + --project flag All singular config keys remain supported for backward compatibility. Co-authored-by: Copilot <[email protected]>
Owner
|
Fix-merged to main. Great work on multi-project support! |
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.
Summary
Adds multi-project/team support to all three tracker integrations (Linear, Jira, ADO) with shared infrastructure to keep the logic DRY.
Closes #2791
Supersedes #2804 and #2805.
Shared Infrastructure (
internal/tracker/multiproject.go)Reusable helpers all trackers compose:
ParseCommaSeparated(s)— splits comma-separated config, trims whitespaceDeduplicateStrings(ss)— removes duplicates preserving orderResolveProjectIDs(cli, plural, singular)— config precedence: CLI flag > plural key > singular keyUsed by Linear's
Init(), Jira'sInit(), ADO'sgetADOConfig(), and all three CLI layers.Linear Changes
client *Clientclients map[string]*Clientlinear.team_idlinear.team_ids/LINEAR_TEAM_IDS--team ID1,ID2flag--teamwhen multiple teamsJira Changes
projectKey stringprojectKeys []stringjira.projectjira.projects/JIRA_PROJECTS--project KEY1,KEY2flagproject = "PROJ"project IN ("PROJ1", "PROJ2")— single queryADO Changes
project stringprojects []stringado.projectado.projects/AZURE_DEVOPS_PROJECTS--project PROJ1,PROJ2flagTeamProject = 'X'TeamProject IN ('X','Y')— single queryTests
internal/tracker/multiproject_test.go: ParseCommaSeparated, DeduplicateStrings, ResolveProjectIDsinternal/linear/tracker_test.go: Multi-team Validate, SetTeamIDs, TeamIDs, PrimaryClientcmd/bd/linear_test.go: linearConfigToEnvVar (team_ids mapping)Backward Compatibility
linear.team_id,jira.project,ado.project) still work