OPC # 0006: OPC Git Trunk-Based management
Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
@@ -16,6 +16,7 @@ export interface BranchStatus {
|
||||
aheadOfNext: number;
|
||||
behindNext: number;
|
||||
unreleasedCommits: CommitInfo[];
|
||||
tipSha: string | null;
|
||||
}
|
||||
|
||||
export interface PromotionRecord {
|
||||
@@ -202,3 +203,18 @@ export async function createLadderBranch(branch: string, fromSha: string, repo:
|
||||
throw new Error((body as { error?: string }).error ?? res.statusText);
|
||||
}
|
||||
}
|
||||
|
||||
// ── Build gate ───────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
export interface BuildGate {
|
||||
status: 'Green' | 'Red' | 'Running' | 'Unknown';
|
||||
sha: string;
|
||||
buildId: string | null;
|
||||
buildStatus: string | null;
|
||||
}
|
||||
|
||||
export async function getBuildGate(sha: string): Promise<BuildGate> {
|
||||
const res = await fetch(`${BASE_URL}/api/promotions/build-gate?sha=${encodeURIComponent(sha)}`);
|
||||
if (!res.ok) throw new Error(`Failed to get build gate: ${res.statusText}`);
|
||||
return res.json();
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ export interface ReleaseRecord {
|
||||
startedAt: string;
|
||||
finishedAt?: string;
|
||||
tenants: TenantReleaseResult[];
|
||||
opcNumbers: string[];
|
||||
}
|
||||
|
||||
export async function getReleaseHistory(): Promise<ReleaseRecord[]> {
|
||||
|
||||
Reference in New Issue
Block a user