fix(types): correct GitHubOperations interface and test type assertions

- Tighten GitHubOperations.findPrForBranch and mergePr param types to
  match the literal unions in FindPrParams/MergePrParams, fixing the
  GitHubClient assignability error in dashboard.ts and serve.ts
- Cast MockStore as unknown as TaskStore at mesh-routes.test.ts call
  site to satisfy TaskStore shape without implementing 117 methods
- Double-cast AgentGenerationSession via unknown in agent-generation.test.ts
  to silence the unsafe conversion diagnostic

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
gsxdsm
2026-04-10 21:16:42 -07:00
parent 1a3ff011d3
commit 1bf4db2277
3 changed files with 5 additions and 5 deletions

View File

@@ -22,7 +22,7 @@ import type { Settings, TaskDetail, PrInfo } from "@fusion/core";
* Defined locally to avoid importing from @fusion/dashboard.
*/
interface GitHubOperations {
findPrForBranch(params: { head: string; state: string }): Promise<PrInfo | null>;
findPrForBranch(params: { head: string; state?: "open" | "closed" | "all" }): Promise<PrInfo | null>;
createPr(params: { title: string; body: string; head: string }): Promise<PrInfo>;
getPrMergeStatus(base?: string, head?: string, number?: number): Promise<{
prInfo: PrInfo;
@@ -31,7 +31,7 @@ interface GitHubOperations {
mergeReady: boolean;
blockingReasons: string[];
}>;
mergePr(params: { number: number; method: string }): Promise<PrInfo>;
mergePr(params: { number: number; method?: "merge" | "squash" | "rebase" }): Promise<PrInfo>;
}
/**