pull_request_comment

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 16, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package pull_request_comment provides necessary interfaces and implementations for processing pull request comment alerts.

Index

Constants

View Source
const (
	// AlertType is the type of the pull request comment alert engine
	AlertType = "pull_request_comment"
	// PrCommentMaxLength is the maximum length of the pull request comment
	// (this was derived from the limit of the GitHub API)
	PrCommentMaxLength = 65536
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Alert

type Alert struct {
	// contains filtered or unexported fields
}

Alert is the structure backing the noop alert

func NewPullRequestCommentAlert

func NewPullRequestCommentAlert(
	actionType interfaces.ActionType,
	reviewCfg *pb.RuleType_Definition_Alert_AlertTypePRComment,
	gh provifv1.GitHub,
	setting models.ActionOpt,
) (*Alert, error)

NewPullRequestCommentAlert creates a new pull request comment alert action

func (*Alert) Class

func (alert *Alert) Class() interfaces.ActionType

Class returns the action type of the PR comment alert engine

func (*Alert) Do

Do comments on a pull request

func (*Alert) GetOnOffState

func (alert *Alert) GetOnOffState() models.ActionOpt

GetOnOffState returns the alert action state read from the profile

func (*Alert) Type

func (*Alert) Type() string

Type returns the action subtype of the PR comment alert engine

type PrCommentTemplateParams added in v0.0.81

type PrCommentTemplateParams struct {
	// EvalErrorDetails is the details of the error that occurred during evaluation, which may be empty
	EvalErrorDetails string

	// EvalResult is the output of the evaluation, which may be empty
	EvalResultOutput any
}

PrCommentTemplateParams is the parameters for the PR comment templates

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL