Skip to content

Where people and agents ship software together. The open-source git platform for the whole job: issues, agents, checks and deploys to the edge.

11 linesCodeBlameRaw
1/** The sync service's explicit removal marker; parse errors and branch-only files are not archives. */
2export function isArchivedWorkflow(workflow: { error: string | null }): boolean {
3 return workflow.error === "Its file is no longer on the default branch.";
4}
5
6export function groupWorkflows<T extends { error: string | null }>(workflows: readonly T[]): { current: T[]; archived: T[] } {
7 const current: T[] = [];
8 const archived: T[] = [];
9 for (const workflow of workflows) (isArchivedWorkflow(workflow) ? archived : current).push(workflow);
10 return { current, archived };
11}