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 ¶
func (alert *Alert) Do( ctx context.Context, cmd interfaces.ActionCmd, entity protoreflect.ProtoMessage, params interfaces.ActionsParams, metadata *json.RawMessage, ) (json.RawMessage, error)
Do comments on a pull request
func (*Alert) GetOnOffState ¶
GetOnOffState returns the alert action state read from the profile
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
Click to show internal directories.
Click to hide internal directories.