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:
@@ -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>;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user