You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(linear-sync): look up team per issue instead of using global default (#3495)
"vCluster / Platform" team no longer exists after company reorg. Different
teams have different workflow state IDs for "Released" state, so we must
look up the released state ID per-team based on each issue's actual team.
Key changes:
- Remove hardcoded -linear-team-name flag
- Add GetIssueDetails() to fetch issue state and team in single API call
- Cache released state IDs by team name to avoid redundant lookups
- Pass pre-fetched IssueDetails to MoveIssueToState() to eliminate double API call
- Add debug info (available teams/states) when workflow lookup fails
- Add deduplicateIssueIDs() to handle same issue in multiple PRs
logger.Debug("Skipping issue not in ready for release state", "issueID", issueID, "currentState", currentIssueStateName, "requiredState", readyForReleaseStateName)
logger.Debug("Skipping issue not in ready for release state", "issueID", issueID, "currentState", issueDetails.StateName, "requiredState", readyForReleaseStateName)
Copy file name to clipboardExpand all lines: hack/linear-sync/main.go
+31-13Lines changed: 31 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -47,7 +47,6 @@ func run(
47
47
linearToken=flagset.String("linear-token", "", "The Linear token to use for authentication")
48
48
releasedStateName=flagset.String("released-state-name", "Released", "The name of the state to use for the released state")
49
49
readyForReleaseStateName=flagset.String("ready-for-release-state-name", "Ready for Release", "The name of the state that indicates an issue is ready to be released")
50
-
linearTeamName=flagset.String("linear-team-name", "vCluster / Platform", "The name of the team to use for the linear team")
51
50
dryRun=flagset.Bool("dry-run", false, "Do not actually move issues to the released state")
52
51
strictFiltering=flagset.Bool("strict-filtering", true, "Only include PRs that were actually merged before the release was published (recommended to avoid false positives)")
0 commit comments