Documentation
¶
Overview ¶
Package pull_request provides the pull request remediation engine
Index ¶
Constants ¶
View Source
const (
// RemediateType is the type of the REST remediation engine
RemediateType = "pull_request"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PrTemplateParams ¶
type PrTemplateParams struct {
// Entity is the entity to be evaluated
Entity any
// Profile are the parameters to be used in the template
Profile map[string]any
// Params are the rule instance parameters
Params map[string]any
}
PrTemplateParams is the parameters for the PR templates
type Remediator ¶
type Remediator struct {
// contains filtered or unexported fields
}
Remediator is the remediation engine for the Pull Request remediation type
func NewPullRequestRemediate ¶
func NewPullRequestRemediate( actionType interfaces.ActionType, prCfg *pb.RuleType_Definition_Remediate_PullRequestRemediation, pbuild *providers.ProviderBuilder, ) (*Remediator, error)
NewPullRequestRemediate creates a new PR remediation engine
func (*Remediator) Class ¶
func (r *Remediator) Class() interfaces.ActionType
Class returns the action type of the remediation engine
func (*Remediator) Do ¶
func (r *Remediator) Do( ctx context.Context, _ interfaces.ActionCmd, remAction interfaces.ActionOpt, ent protoreflect.ProtoMessage, params interfaces.ActionsParams, _ *json.RawMessage, ) (json.RawMessage, error)
Do performs the remediation
func (*Remediator) GetOnOffState ¶
func (_ *Remediator) GetOnOffState(p *pb.Profile) interfaces.ActionOpt
GetOnOffState returns the alert action state read from the profile
func (*Remediator) Type ¶
func (_ *Remediator) Type() string
Type returns the action subtype of the remediation engine
Click to show internal directories.
Click to hide internal directories.