UNPKG

1.76 kBTypeScriptView Raw
1import { Severity } from "@atomist/automation-client/lib/operations/review/ReviewResult";
2import { ReviewListener } from "../../../api/listener/ReviewListener";
3import { PushImpactResponse } from "../../../api/registration/PushImpactListenerRegistration";
4import { ReviewListenerRegistration } from "../../../api/registration/ReviewListenerRegistration";
5/**
6 * Return review listener function that returns `pir` if there are any
7 * review comments with the provided severity. The method will short
8 * circuit once any comment with the provided severity is found.
9 *
10 * @param pir push impact response to return if there are comments
11 * with provided severities
12 * @param severity severity that should trigger a return of `pir`,
13 * "error" by default
14 * @return ReviewListener that returns `pir` if any comments have
15 * a severity of `severity`, proceed otherwise
16 */
17export declare function severityReviewListener(pir: PushImpactResponse, severity?: Severity): ReviewListener;
18/**
19 * Listener that fails the code inspection if the review has any
20 * error comments.
21 */
22export declare const FailGoalIfErrorComments: ReviewListenerRegistration;
23/**
24 * Listener that requires approval on the code inspection if the
25 * review has any error comments.
26 */
27export declare const ApproveGoalIfErrorComments: ReviewListenerRegistration;
28/**
29 * Listener that fails the code inspection if the review has any
30 * warn comments.
31 */
32export declare const FailGoalIfWarnComments: ReviewListenerRegistration;
33/**
34 * Listener that requires approval on the code inspection if the
35 * review has any warn comments.
36 */
37export declare const ApproveGoalIfWarnComments: ReviewListenerRegistration;
38//# sourceMappingURL=goalReviewListener.d.ts.map
\No newline at end of file