UNPKG

@atomist/sample-sdm

Version:

Sample Atomist automation for software delivery

29 lines (28 loc) 1.35 kB
import { RemoteRepoRef } from "@atomist/automation-client/operations/common/RepoId"; import { ReviewComment } from "@atomist/automation-client/operations/review/ReviewResult"; import { ReviewListener } from "@atomist/sdm"; export declare type CommentFilter = (r: ReviewComment) => boolean; /** * Format the body of an issue based on this comment */ export declare type CommentFormatter = (comment: ReviewComment, rr: RemoteRepoRef) => string; /** * Format the body of an issue based on these comments */ export declare type CommentsFormatter = (comments: ReviewComment[], rr: RemoteRepoRef) => string; /** * Manage a single issue for a subset of review problems * @param commentFilter filter for relevant review comments * @param title title of the issue to manage * @param bodyFormatter function to create body from comments * @return {Promise<void>} * @constructor */ export declare function singleIssueManagingReviewListener(commentFilter: CommentFilter, title: string, bodyFormatter: CommentsFormatter): ReviewListener; /** * Take this subset of issues and maintain an issue for each * @param {CommentFilter} commentFilter * @param {CommentsFormatter} bodyFormatter * @return {ReviewListener} */ export declare function multiIssueManagingReviewListener(commentFilter: CommentFilter, bodyFormatter: CommentFormatter): ReviewListener;