-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
TL;DR
Implement a lookup resolver that converts human-readable names (state, labels, projects, milestones) to Linear UUIDs, with caching to minimize API calls.
Deliverables
-
scripts/linear-sync/lookups.tsmodule - State name → UUID resolver (e.g.,
planned→acc37e31-...) - Label name → UUID resolver (e.g.,
Improvement→d8655b06-...) - Project slug → UUID resolver
- Milestone slug → UUID resolver
- Issue identifier → UUID resolver (for parent references)
- In-memory cache populated once per sync run
Acceptance Criteria
- Single API call per entity type (states, labels, projects) at sync start
- Cache persists for duration of sync run
- Graceful handling of unknown values (log warning, skip field)
- State mapping handles local names:
planned→Backlog,in_progress→In Progress,done→Done - Works with team-scoped and workspace-scoped labels
Testing / Verification
# Verify lookups resolve correctly
bun run scripts/linear-sync/lookups.ts --test
# Expected: Prints resolved UUIDs for known states/labelsDependencies / Notes
- Depends on:
@linear/sdknpm package - Depends on:
LINEAR_API_KEYenvironment variable - Blocks: Sync engine (needs UUIDs to create/update issues)
- API calls: ~5 calls per sync run (states, labels, projects, milestones, team)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels