pull_request

package
v0.0.79 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2024 License: Apache-2.0 Imports: 35 Imported by: 0

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

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

Jump to

Keyboard shortcuts

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