[refactor] Split jiraService.js into focused modules #6
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
src/services/jiraService.jshas grown to ~1300 lines and mixes: shared HTTP client, issue reads, ADF/comments, attachments, JSM Service Desk requests, and Assets AQL. Proposed layout:src/services/jira/client.js— shared axios client, auth, retrysrc/services/jira/issues.js— fetchJiraIssue, getTicketStatus, updateTicket, getTransitions, transitionTicket, closeTicketsrc/services/jira/comments.js— ADF helpers, addComment, postWebexSummaryCommentsrc/services/jira/attachments.js— attachFileToJira, attachReadableTranscriptsrc/services/jira/jsmRequests.js— createSSRequest + REQUEST_TYPE_MAP + subType lookupssrc/services/jira/assets.js— workspace/schemas/aql helpers + probeAssetsForStoreKeep
services/jiraService.jsas a barrel re-export so no callers need to change import paths.Done in commit
b8f2eab. Pure move + one-way rewire, no logic changes.The old 1467-line
src/services/jiraService.jsis now a ~100-line barrel that re-exports the same public surface, so both current consumers (import * as jiraServiceinwxccRoutes.js,import { jiraClient }inhealthService.js) keep working unchanged.New layout under
src/services/jira/:client.js—jiraClient,downloadClient,plainTextToAdfissues.js— fetch / search / status / update / transitions / closecomments.js—fetchPublicComments,addComment,postWebexSummaryCommentattachments.js—attachFileToJira,attachReadableTranscriptassets.js— AQL helpers,resolveStoreAssetReference,probeAssetsForStorejsmRequests.js—REQUEST_TYPE_MAP,createSSRequest, subtype helpersDep graph is a DAG (no cycles): everything depends on
client.js;issues.jsdepends oncomments.js;jsmRequests.jsdepends onassets.js.Verified by real ES-module import: all 23 named exports +
defaultpresent,REQUEST_TYPE_MAPstill has 14 entries,jiraClientstill instantiates against the configured baseURL, and both consumers import without errors. New code should import fromservices/jira/*directly; the barrel is only for backward compatibility.Commits on
cursor/hardening-4-5-6-7:c4a0a69Fix #4312448fFix #5b8f2eabRefactor #6Branch: cursor/hardening-4-5-6-7
Compare: init-repo-and-jira-lifecycle...hardening-4-5-6-7