UNPKG

@issue-linker/core

Version:
62 lines 1.74 kB
import type { ActionMode, CheckMode, IssueStatusFilter } from "./validation-schemas.js"; export interface InputConfig { text: string; checkMode: CheckMode; extract?: string; exclude?: string; issueStatus: IssueStatusFilter; repo: string; /** * Action mode - Used only by GitHub Actions to track where the validation was triggered from. * This field is for telemetry/logging purposes only and does not affect the validation logic. * @internal */ actionMode?: ActionMode; } interface WrongStateIssue { number: number; actualState: "open" | "closed"; } export interface IssueInfo { found: number[]; valid: number[]; notFound: number[]; wrongState: WrongStateIssue[]; } export interface ErrorInfo { type: string; message: string; stack?: string; } export interface BaseResult { success: boolean; message: string; error?: ErrorInfo; } export type ValidationReason = "excluded" | "skipped" | "valid" | "no-issues" | "invalid-issues" | "error"; export interface CheckMessageResult extends BaseResult { reason: ValidationReason; input: InputConfig; issues?: IssueInfo; } export interface CreateIssueCommentResult extends BaseResult { commentId?: number; } export interface CheckDuplicateCommentResult { duplicateFound: boolean; duplicateCommentId?: number; error?: ErrorInfo; } export interface BatchCommentItemResult { issueNumber: number; success: boolean; skipped?: boolean; message?: string; commentId?: number; error?: ErrorInfo; } export interface CommentOnBranchIssuesResult extends BaseResult { results: BatchCommentItemResult[]; } export {}; //# sourceMappingURL=result.d.ts.map