Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "api-helper/code/review/goalReviewListener"

Index

Functions

severityReviewListener

  • Return review listener function that returns pir if there are any review comments with the provided severity. The method will short circuit once any comment with the provided severity is found.

    Parameters

    • pir: PushImpactResponse

      push impact response to return if there are comments with provided severities

    • Default value severity: Severity = "error"

      severity that should trigger a return of pir, "error" by default

    Returns ReviewListener

    ReviewListener that returns pir if any comments have a severity of severity, proceed otherwise

Object literals

Const ApproveGoalIfErrorComments

ApproveGoalIfErrorComments: object

Listener that requires approval on the code inspection if the review has any error comments.

listener

listener: Function1<ReviewListenerInvocation, Promise<DefaultPushImpactListenerResult>> = severityReviewListener(PushImpactResponse.requireApprovalToProceed)

name

name: string = "Require approval if any code inspections result in comments with severity error"

Const ApproveGoalIfWarnComments

ApproveGoalIfWarnComments: object

Listener that requires approval on the code inspection if the review has any warn comments.

listener

listener: Function1<ReviewListenerInvocation, Promise<DefaultPushImpactListenerResult>> = severityReviewListener(PushImpactResponse.requireApprovalToProceed, "warn")

name

name: string = "Require approval if any code inspections result in comments with severity warn"

Const FailGoalIfErrorComments

FailGoalIfErrorComments: object

Listener that fails the code inspection if the review has any error comments.

listener

listener: Function1<ReviewListenerInvocation, Promise<DefaultPushImpactListenerResult>> = severityReviewListener(PushImpactResponse.failGoals)

name

name: string = "Fail goal if any code inspections result in comments with severity error"

Const FailGoalIfWarnComments

FailGoalIfWarnComments: object

Listener that fails the code inspection if the review has any warn comments.

listener

listener: Function1<ReviewListenerInvocation, Promise<DefaultPushImpactListenerResult>> = severityReviewListener(PushImpactResponse.failGoals, "warn")

name

name: string = "Fail goal if any code inspections result in comments with severity warn"

Generated using TypeDoc