import type { RunTextCommand } from '../gh-cli/index.mts'; /** * A reasonable default for `findProjectCompletionSiblings`' `remainder` parameter: once this few * other open items remain in a cross-repo GitHub Projects v2 project a change is touching, the * project is worth calling out as nearly done. Callers may pass their own threshold instead. */ export declare const DEFAULT_PROJECT_COMPLETION_REMAINDER = 3; export type ProjectRef = { id: string; title: string; url: string; }; export type ProjectMembershipResult = { ok: true; projects: ProjectRef[]; } | { error: string; ok: false; scopeError: boolean; }; export type ProjectGroup = { keys: Set; project: ProjectRef; }; export type ProjectSibling = { key: string; projectTitle: string; projectUrl: string; title: string; }; export declare function isProjectScopeError(message: string): boolean; export declare function buildIssueProjectItemsArgs(owner: string, repo: string, number: number): string[]; /** * Fetches every OPEN project an issue belongs to. An issue can carry more than one `projectItems` * node — a project workflow can add an issue to a project automatically — so this returns every * open one rather than assuming, or requiring, exactly one; callers should audit each * independently rather than picking one arbitrarily. Distinguishes a missing/insufficient * `project` scope (`scopeError: true`; callers typically collapse to a single skipped-audit * notice) from any other failure (callers typically degrade this one issue to "no memberships"). */ export declare function fetchIssueProjectMemberships(runGh: RunTextCommand, owner: string, repo: string, number: number): Promise; export declare function buildProjectItemsArgs(projectId: string): string[]; /** * For each distinct project a change touches, enumerates that project's other open issue items * across every repo it spans — a project has no per-repo scoping, so one query covers all of them * (capped at the first 100 items). Silent (`[]`) once the remainder exceeds `remainder` * (`DEFAULT_PROJECT_COMPLETION_REMAINDER` unless the caller passes its own). A per-project query * failure degrades that one project to "no siblings audited" rather than throwing — every other * project still completes. */ export declare function findProjectCompletionSiblings(runGh: RunTextCommand, groups: ReadonlyMap, remainder?: number): Promise;