@atomist/automation-client
Version:
Atomist API for software low-level client
62 lines • 1.84 kB
TypeScript
import { HandlerResult } from "../../HandlerResult";
import { RepoRef } from "../common/RepoId";
import { SourceLocation } from "../common/SourceLocation";
export declare type Severity = "error" | "warn" | "info";
/**
* A single comment on a project, with optional source location.
*/
export interface ReviewComment {
readonly severity: Severity;
/**
* Name of the category to which this comment applies: E.g. "Usage of Foobar API"
*/
readonly category: string;
/**
* Details of the problem
*/
readonly detail: string;
readonly sourceLocation?: SourceLocation;
/**
* Command invocation that will fix this problem
*/
readonly fix?: Fix;
}
/**
* Coordinates of an Atomist command handler to fix a specific problem
*/
export interface Fix {
command: string;
params: {
[propName: string]: string | number;
};
}
export declare class DefaultReviewComment implements ReviewComment {
severity: Severity;
category: string;
detail: string;
sourceLocation: SourceLocation;
fix?: Fix;
constructor(severity: Severity, category: string, detail: string, sourceLocation: SourceLocation, fix?: Fix);
}
/**
* The result of reviewing a single project
*/
export interface ProjectReview {
repoId: RepoRef;
comments: ReviewComment[];
}
/**
* The result of reviewing many projects: For example,
* all the projects in an org
*/
export interface ReviewResult<T extends ProjectReview = ProjectReview> extends HandlerResult {
projectsReviewed: number;
projectReviews: T[];
}
/**
* Give a project a clean bill of health, with no comments
* @param repoId identification of project
* @return {{repoId: RepoRef, comments: Array}}
*/
export declare function clean(repoId: RepoRef): ProjectReview;
//# sourceMappingURL=ReviewResult.d.ts.map