UNPKG

@phren/cli

Version:

Knowledge layer for AI agents - CLI, MCP server, and data layer

26 lines (25 loc) • 1.38 kB
import type { GitHostProvider, HostTerms } from "./git-hosts.js"; /** GitLab, gitlab.com or self-hosted, over its REST API (v4). The token is * GITLAB_TOKEN, the Hook's stored one, or glab's own sign-in, so glab itself * is optional. Merge requests come back in the same shape as GitHub's pull * requests; pipeline jobs are the checks, and the stage reads as the workflow. */ export declare const MERGE_TERMS: HostTerms; type Order = "failing" | "pending" | "passing" | "skipped" | "neutral"; /** A pipeline or job status as one state word. An allowed failure is neutral: * it doesn't block the merge request. */ export declare function gitlabState(status: unknown, allowFailure?: boolean): Order; export declare function gitlabRollup(states: Order[]): "passing" | "failing" | "pending" | null; /** What `detailed_merge_status` means, in GitHub's mergeStateStatus words * (which the clients already colour) plus GitLab's own sentence. */ export declare function gitlabMergeState(detail: unknown): { mergeState?: string; mergeDetail?: string; }; /** gh's --fill: one commit gives the title and body; several give a title from * the branch and a body listing them. */ export declare function fillFromCommits(root: string, baseRef: string, branch: string): Promise<{ title: string; body: string; }>; export declare const gitlab: GitHostProvider; export {};