import { apiRequest } from '../../lib/api'; export type CommonAppPipeline = { id: string; repository: string; message: string; branch: string; status: string; createdAt: number; ciUrl?: string | null; url?: string | null; }; export function listCommonAppPipelines() { return apiRequest<{ repos?: CommonAppPipeline[]; baseUrl?: string | null }>('/woodpecker/repos') .then((result) => (result.repos ?? []).map((repo) => ({ ...repo, ciUrl: repo.ciUrl ?? result.baseUrl ?? null }))); }