UNPKG

@atomist/sdm-pack-aspect

Version:

an Atomist SDM Extension Pack for visualizing drift across an organization

39 lines 1.87 kB
import { NoParameters, ProjectReview, ReviewComment } from "@atomist/automation-client"; import { CodeTransform, ReviewerRegistration } from "@atomist/sdm"; import { Aspect, FP } from "@atomist/sdm-pack-fingerprint"; import { CodeInspection } from "@atomist/sdm/lib/api/registration/CodeInspectionRegistration"; import { AspectMetadata, CountAspect, CountData } from "../compose/commonTypes"; export declare type EligibleReviewer = ReviewerRegistration | CodeInspection<ProjectReview, NoParameters>; export interface ReviewerAspectOptions extends AspectMetadata { /** * Reviewer that can provide the fingerprint */ readonly reviewer: EligibleReviewer; /** * Code transform that can remove usages of this problematic fingerprint */ readonly terminator?: CodeTransform<NoParameters>; /** * Do we want classification for this aspect */ readonly emitClassifier?: boolean; /** * If provided, causes classification to take place and specifies a custom tag. * Otherwise tag will default to name passed into reviewerAspects */ readonly tag?: string; } /** * Emit fingerprint aspect, count aspect and classification aspect for the given review comment. * If a terminator CodeTransform is provided, it will try to delete all instances of the fingerprint */ export declare function reviewerAspects(opts: ReviewerAspectOptions): Aspect[]; export declare function isReviewCommentFingerprint(fp: FP): fp is FP<ReviewComment>; /** * Count the problematic usage and delete it if necessary * @param {ReviewerAspectOptions} opts * @return {CountAspect} */ export declare function reviewCommentCountAspect(opts: ReviewerAspectOptions): CountAspect; export declare function findReviewCommentCountFingerprint(name: string, fps: FP[]): FP<CountData> | undefined; //# sourceMappingURL=reviewerAspect.d.ts.map