feat(linear): register Linear in bootstrap and add DB lookup functions#1097
Merged
feat(linear): register Linear in bootstrap and add DB lookup functions#1097
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
nhopeatall
approved these changes
Apr 14, 2026
Collaborator
nhopeatall
left a comment
There was a problem hiding this comment.
LGTM — Clean, well-structured addition that follows the existing Jira/Trello patterns precisely.
Summary
This PR adds Linear support to the config layer (DB lookups, caching, mapper) by replicating the exact patterns already established for Trello and Jira. All CI checks pass. The changes are consistent with the codebase conventions.
Verified:
LinearIntegrationConfiginterface matches the ZodLinearConfigSchemainschema.ts(already present)linearTeamIdWhereClausefollows the same subquery pattern asboardIdWhereClauseandjiraProjectKeyWhereClause- Cache layer (
configCache.ts) follows the same get/set/clear pattern as other project lookup caches - Provider layer (
provider.ts) follows the same cache-then-DB pattern asfindProjectByJiraProjectKeyandfindProjectByBoardId - PM type derivation priority (
jira > linear > trello) is a reasonable default — Jira takes precedence if both exist, Linear before Trello - Bootstrap registration (
bootstrap.ts) and schema (schema.ts) already had Linear support from prior work - Tests cover cache hit, cache miss with DB lookup, and cache-undefined-on-not-found for the provider; mapper tests cover extraction, PM type derivation, and config building; repository tests cover the DB lookup path
🕵️ claude-code · claude-opus-4-6 · run details
zbigniewsobiecki
added a commit
that referenced
this pull request
Apr 18, 2026
Task 4: src/integrations/entrypoint.ts centralises every PM/SCM/alerting registration barrel. Router, worker, CLI bootstrap, and dashboard all side-effect-import this single file — no per-surface list of imports that can drift when a new provider is added. Previously dashboard.ts didn't register any PM providers at all, which is also fixed here. Task 5: tests/unit/integrations/entrypoint-usage.test.ts grep-asserts the invariant that every process entry file imports src/integrations/entrypoint.js. Missing this import was the root cause of #1097, #1118, #1131, #1134 — the test references those bug numbers in its failure message. Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
5 tasks
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
LinearIntegrationin bothpmRegistryandintegrationRegistryinsrc/integrations/bootstrap.ts(already done in prior work, verified idempotent withgetOrNullguards)LinearIntegrationConfiginterface and updatesextractIntegrationConfigs(),MapProjectInput, andmapProjectRow()insrc/db/repositories/configMapper.tsto handle linear configlinearTeamIdWhereClause,findProjectByLinearTeamIdFromDb(), andfindProjectWithConfigByLinearTeamId()insrc/db/repositories/configRepository.tsprojectByLinearTeamIdcache insrc/config/configCache.tsfindProjectByLinearTeamId()andloadProjectConfigByLinearTeamId()with cache support insrc/config/provider.tsLinearPMProviderfromsrc/pm/index.ts(already present)linearoptional schema entry exists inProjectConfigSchemainsrc/config/schema.ts(already present)Trello card: https://trello.com/c/r38vn5My/594-as-a-developer-i-want-linear-registered-in-bootstrap-and-db-lookups-so-that-the-system-can-load-linear-project-configs
Test plan
npm run typecheckpasses)npm test— 7323 tests across 372 files)configMapper:extractIntegrationConfigsextracts linear config,mapProjectRowsets pm.type to linear and builds linear configconfigRepository: loads Linear integration,findProjectByLinearTeamIdFromDbreturns project by team IDprovider:findProjectByLinearTeamIdcaches and delegates to DB lookup correctly🤖 Generated with Claude Code
🕵️ claude-code · claude-sonnet-4-6 · run details