1 | import { RepoRef } from "@atomist/automation-client/lib/operations/common/RepoId";
|
2 | import { Project } from "@atomist/automation-client/lib/project/Project";
|
3 | import { NoParameters } from "@atomist/automation-client/lib/SmartParameters";
|
4 | import { CommandListenerInvocation } from "../listener/CommandListener";
|
5 | import { ProjectsOperationRegistration } from "./ProjectsOperationRegistration";
|
6 | import { PushAwareParametersInvocation } from "./PushAwareParametersInvocation";
|
7 |
|
8 |
|
9 |
|
10 |
|
11 | export declare type CodeInspection<R, P = NoParameters> = (p: Project, papi: PushAwareParametersInvocation<P>) => Promise<R>;
|
12 |
|
13 |
|
14 |
|
15 | export interface CodeInspectionResult<R> {
|
16 | repoId: RepoRef;
|
17 | |
18 |
|
19 |
|
20 |
|
21 | result: R | undefined;
|
22 | }
|
23 |
|
24 |
|
25 |
|
26 | export interface CodeInspectionActions<R, PARAMS> {
|
27 | |
28 |
|
29 |
|
30 | inspection: CodeInspection<R, PARAMS>;
|
31 | |
32 |
|
33 |
|
34 |
|
35 |
|
36 |
|
37 | onInspectionResults?(results: Array<CodeInspectionResult<R>>, ci: CommandListenerInvocation<PARAMS>): Promise<void>;
|
38 | }
|
39 |
|
40 |
|
41 |
|
42 |
|
43 | export interface CodeInspectionRegistration<R, PARAMS = NoParameters> extends ProjectsOperationRegistration<PARAMS>, CodeInspectionActions<R, PARAMS> {
|
44 | }
|
45 |
|
\ | No newline at end of file |