import type { Commit } from './sourceCommit/parse-source-commit.js';
export type ErrorContext = {
    code: 'merge-conflict-exception';
    conflictingFiles: string[];
    commitsWithoutBackports: {
        formatted: string;
        commit: Commit;
    }[];
} | {
    code: 'invalid-branch-exception';
    branchName: string;
} | {
    code: 'no-branches-exception';
} | {
    code: 'abort-conflict-resolution-exception';
} | {
    code: 'pr-not-found-exception';
    pullNumber: number;
} | {
    code: 'pr-not-merged-exception';
    pullNumber: number;
} | {
    code: 'commit-not-found-exception';
    sha: string;
    sourceBranch: string;
} | {
    code: 'no-commits-found-exception';
    message: string;
} | {
    code: 'invalid-credentials-exception';
    message: string;
} | {
    code: 'repo-not-found-exception';
    repoOwner: string;
    repoName: string;
    repoForkOwner: string;
} | {
    code: 'config-error-exception';
    message: string;
} | {
    code: 'pr-creation-exception';
    message: string;
} | {
    code: 'cherrypick-exception';
    message: string;
} | {
    code: 'clone-exception';
    message: string;
} | {
    code: 'buffer-overflow-exception';
    message: string;
} | {
    code: 'branch-not-found-exception';
    branchName: string;
} | {
    code: 'max-retries-exception';
} | {
    code: 'github-api-exception';
    message: string;
} | {
    code: 'auto-merge-not-available-exception';
    message: string;
};
export type BackportErrorCode = ErrorContext['code'];
export declare class BackportError extends Error {
    errorContext: ErrorContext;
    constructor(errorContext: ErrorContext);
}
