feat(FN-4760): complete Step 2 — add PR checks endpoint and client
Fusion-Task-Id: FN-4760 Fusion-Task-Lineage: 71db4a53-ee59-49f0-a1f7-232954b86660
This commit is contained in:
committed by
gsxdsm
parent
ef43957d72
commit
49daa3046d
@@ -2198,6 +2198,9 @@ export interface PrCheckStatus {
|
||||
name: string;
|
||||
required: boolean;
|
||||
state: string;
|
||||
detailsUrl?: string;
|
||||
startedAt?: string;
|
||||
completedAt?: string;
|
||||
}
|
||||
|
||||
export interface PrStatusResponse {
|
||||
@@ -2215,6 +2218,12 @@ export interface PrRefreshResponse {
|
||||
automationStatus?: string | null;
|
||||
}
|
||||
|
||||
export interface PrChecksResponse {
|
||||
checks: PrCheckStatus[];
|
||||
rollup: "success" | "pending" | "failure" | "unknown";
|
||||
lastCheckedAt: string;
|
||||
}
|
||||
|
||||
export interface PrMetadataResponse {
|
||||
title: string;
|
||||
body: string;
|
||||
@@ -2314,6 +2323,11 @@ export function refreshPrStatus(id: string, projectId?: string): Promise<PrRefre
|
||||
});
|
||||
}
|
||||
|
||||
/** Fetch all PR checks for a task */
|
||||
export function fetchPrChecks(id: string, projectId?: string): Promise<PrChecksResponse> {
|
||||
return api<PrChecksResponse>(withProjectId(`/tasks/${id}/pr/checks`, projectId));
|
||||
}
|
||||
|
||||
// --- Issue Management API ---
|
||||
|
||||
/** Re-export GitHub badge-related types for convenience */
|
||||
|
||||
Reference in New Issue
Block a user