Documentation ¶
Overview ¶
Package pull_request provides the pull request remediation engine
Package pull_request provides the pull request remediation engine
Index ¶
Constants ¶
View Source
const ( // TitleMaxLength is the maximum number of bytes for the title TitleMaxLength = 256 // BodyMaxLength is the maximum number of bytes for the body BodyMaxLength = 5120 )
View Source
const (
// ContentBytesLimit is the maximum number of bytes for the content
ContentBytesLimit = 5120
)
See minder.proto for more detailed documentation
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, ghCli provifv1.GitHub, setting models.ActionOpt, ) (*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, cmd interfaces.ActionCmd, ent protoreflect.ProtoMessage, params interfaces.ActionsParams, metadata *json.RawMessage, ) (json.RawMessage, error)
Do perform the remediation
func (*Remediator) GetOnOffState ¶
func (r *Remediator) GetOnOffState() models.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.