/** * PR Link Handler * * Links a PR to an issue, creating a CLOSES relationship in Neo4j * and optionally commenting on the GitHub issue. * * @see .dev/features/github-pr.md for full specification */ import type { IGithubClient } from '../../../domain/interfaces/dal/IGithubClient'; import type { IPullRequestRepository } from '../../../domain/interfaces/dal/IPullRequestRepository'; /** * Options for PR link operation. */ export interface IPrLinkOptions { /** Repository in owner/repo format. Uses current repo if not provided. */ readonly repo?: string; /** PR number to link. */ readonly prNumber: number; /** Issue number to link to. */ readonly issueNumber: number; /** Skip commenting on the GitHub issue. */ readonly noComment?: boolean; } /** * PR info in link result. */ export interface IPrLinkPrInfo { readonly number: number; readonly repo: string; readonly title: string; readonly url: string; } /** * Issue info in link result. */ export interface IPrLinkIssueInfo { readonly number: number; readonly repo: string; readonly title: string; readonly url: string; } /** * Result from PrLinkHandler. */ export interface IPrLinkResult { readonly success: boolean; readonly message: string; /** PR details if successful. */ readonly pr?: IPrLinkPrInfo; /** Issue details if successful. */ readonly issue?: IPrLinkIssueInfo; /** True if the PR was already linked to this issue. */ readonly alreadyLinked: boolean; } /** * Handler for linking PRs to issues. */ export declare class PrLinkHandler { private readonly githubClient; private readonly prRepository; constructor(githubClient: IGithubClient, prRepository: IPullRequestRepository); /** * Link a PR to an issue. * * Creates a CLOSES relationship in Neo4j and optionally comments * on the GitHub issue. Idempotent - linking an already-linked * PR/issue pair returns success with alreadyLinked=true. */ execute(options: IPrLinkOptions): Promise; /** * Map GitHub PR state to domain status. */ private mapPrStatus; } //# sourceMappingURL=PrLinkHandler.d.ts.map