mirror of
https://github.com/stablyai/orca.git
synced 2026-10-19 16:03:26 +00:00
refactor(integrations): split issue-tracker clients under the max-lines budget (#14704)
The GitLab, GitHub, Jira and Linear integration modules, their two IPC registrars, and the shared GitHub project types each carried a file-level `eslint-disable max-lines` and ran 351-614 counted lines against a 300-line budget. AGENTS.md calls for splitting rather than suppressing, and config/max-lines-baseline.txt is a shrink-only ratchet, so this removes all eight suppressions and prunes their entries (341 -> 333). Pure move, no behavior change. Each client is cut along the seam it already had: per-operation modules for the issue APIs (create / update / comment / field options), and for Jira the request queue, site credential store, authenticated request, and site identity. The two IPC registrars keep their own handlers and delegate the rest to per-domain sub-registrars, so they remain real entry points rather than re-export shims. The IPC surface is proved intact rather than assumed: comparing (method, channel) multisets between HEAD and the split gives 52 registrations across 52 distinct channels on both sides. Provider-neutrality is preserved -- GitLab and GitHub keep separate, parallel module layouts rather than being merged behind a shared abstraction. Verified: oxlint clean, ratchet passes, typecheck clean, full unit suite green (the one remaining failure is a pre-existing load flake in an untouched file, green when re-run serially), no new runtime import cycles among 744 modules, and no lint suppression added anywhere.
This commit is contained in:
@@ -9,7 +9,7 @@ import {
|
||||
noteRepositoryRateLimitSpend,
|
||||
type RateLimitBucketKind
|
||||
} from '../rate-limit'
|
||||
import type { GitHubProjectViewError } from '../../../shared/github/project-types'
|
||||
import type { GitHubProjectViewError } from '../../../shared/github/project-result-types'
|
||||
import { githubProjectHost } from '../../../shared/github/project-identity'
|
||||
import { isDefaultGitHubHost } from '../../../shared/github/repository-identity-key'
|
||||
import { isGitHubHostAuthenticatedForGlobalCli } from '../github-enterprise-repository'
|
||||
|
||||
@@ -21,27 +21,29 @@ import { githubProjectHost } from '../../../shared/github/project-identity'
|
||||
import type { PRComment } from '../../../shared/github/comment-types'
|
||||
import type { GitHubAssignableUser } from '../../../shared/github/pull-request-types'
|
||||
import type { GitHubWorkItemDetails } from '../../../shared/github/work-item-types'
|
||||
import type { GitHubProjectFieldMutationValue } from '../../../shared/github/project-types'
|
||||
import type {
|
||||
GitHubProjectCommentMutationResult,
|
||||
GitHubProjectMutationResult,
|
||||
ListAssignableUsersBySlugResult,
|
||||
ListIssueTypesBySlugResult,
|
||||
ListLabelsBySlugResult,
|
||||
ProjectWorkItemDetailsBySlugResult
|
||||
} from '../../../shared/github/project-result-types'
|
||||
import type {
|
||||
AddIssueCommentBySlugArgs,
|
||||
ClearProjectItemFieldArgs,
|
||||
DeleteIssueCommentBySlugArgs,
|
||||
GitHubProjectCommentMutationResult,
|
||||
GitHubProjectFieldMutationValue,
|
||||
GitHubProjectMutationResult,
|
||||
ListAssignableUsersBySlugArgs,
|
||||
ListAssignableUsersBySlugResult,
|
||||
ListIssueTypesBySlugArgs,
|
||||
ListIssueTypesBySlugResult,
|
||||
ListLabelsBySlugArgs,
|
||||
ListLabelsBySlugResult,
|
||||
ProjectWorkItemDetailsBySlugArgs,
|
||||
ProjectWorkItemDetailsBySlugResult,
|
||||
UpdateIssueBySlugArgs,
|
||||
UpdateIssueCommentBySlugArgs,
|
||||
UpdateIssueTypeBySlugArgs,
|
||||
UpdatePullRequestBySlugArgs,
|
||||
UpdateProjectItemFieldArgs
|
||||
} from '../../../shared/github/project-types'
|
||||
} from '../../../shared/github/project-request-types'
|
||||
|
||||
function githubHostExecOptions(args: { host?: string }): { host: string } {
|
||||
return { host: githubProjectHost(args.host) }
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Why: turns raw gh stderr/stdout into the typed GitHubProjectViewError the
|
||||
// renderer can act on (auth vs scope vs rate limit vs drift), shared by the
|
||||
// project-view read and mutation paths.
|
||||
import type { GitHubProjectViewError } from '../../../shared/github/project-types'
|
||||
import type { GitHubProjectViewError } from '../../../shared/github/project-result-types'
|
||||
import { githubProjectHost } from '../../../shared/github/project-identity'
|
||||
|
||||
export type GhGraphqlErrorShape = {
|
||||
|
||||
Reference in New Issue
Block a user