UNPKG

@codechecks/client

Version:

Open source platform for code review automation

23 lines (22 loc) 926 B
import { PrInfo } from "../api"; import { ExecutionContext } from "../getExecutionContext"; import { CodeChecksReport } from "../types"; import { CiProvider, Env } from "./types"; /** * Run codechecks locally, not on CI. It requires running within git reposistory. */ export declare class LocalProvider implements CiProvider { private readonly env; private readonly forcedLocalProjectSlug?; constructor(env: Env, forcedLocalProjectSlug?: string | undefined); isCurrentlyRunning(): boolean; getCurrentSha(): Promise<string>; getProjectSlug(): Promise<string>; getPullRequestID(): number; getPrInfo(): Promise<PrInfo>; private getShaForRef; isFork(): boolean; supportsSpeculativeBranchSelection(): boolean; } export declare function checkIfIsLocalMode(provider: CiProvider): boolean; export declare function processReport(report: CodeChecksReport, context: ExecutionContext): void;