Documentation ¶
Index ¶
- type AndRequirement
- type Options
- type OrRequirement
- type Policy
- type RequestReview
- type Requires
- type Rule
- func (r *Rule) Evaluate(ctx context.Context, prctx pull.Context) (res common.Result)
- func (r *Rule) FilteredCandidates(ctx context.Context, prctx pull.Context) ([]*common.Candidate, []*common.Dismissal, error)
- func (r *Rule) IsApproved(ctx context.Context, prctx pull.Context, candidates []*common.Candidate) (bool, common.RequiresResult, error)
- func (r *Rule) Trigger() common.Trigger
- type RuleRequirement
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AndRequirement ¶
type AndRequirement struct {
// contains filtered or unexported fields
}
func (*AndRequirement) Trigger ¶ added in v1.20.0
func (r *AndRequirement) Trigger() common.Trigger
type Options ¶
type Options struct { AllowAuthor bool `yaml:"allow_author"` AllowContributor bool `yaml:"allow_contributor"` AllowNonAuthorContributor bool `yaml:"allow_non_author_contributor"` InvalidateOnPush bool `yaml:"invalidate_on_push"` IgnoreEditedComments bool `yaml:"ignore_edited_comments"` IgnoreUpdateMerges bool `yaml:"ignore_update_merges"` IgnoreCommitsBy common.Actors `yaml:"ignore_commits_by"` RequestReview RequestReview `yaml:"request_review"` Methods *common.Methods `yaml:"methods"` }
func (*Options) GetMethods ¶
type OrRequirement ¶
type OrRequirement struct {
// contains filtered or unexported fields
}
func (*OrRequirement) Trigger ¶ added in v1.20.0
func (r *OrRequirement) Trigger() common.Trigger
type RequestReview ¶
type RequestReview struct { Enabled bool `yaml:"enabled"` Mode common.RequestMode `yaml:"mode"` Count int `yaml:"count"` }
type Requires ¶
type Requires struct { Count int `yaml:"count"` Actors common.Actors `yaml:",inline"` Conditions predicate.Predicates `yaml:"conditions"` }
type Rule ¶
type Rule struct { Name string `yaml:"name"` Description string `yaml:"description"` Predicates predicate.Predicates `yaml:"if"` Options Options `yaml:"options"` Requires Requires `yaml:"requires"` }
func (*Rule) FilteredCandidates ¶ added in v1.27.0
func (r *Rule) FilteredCandidates(ctx context.Context, prctx pull.Context) ([]*common.Candidate, []*common.Dismissal, error)
FilteredCandidates returns the potential approval candidates and any candidates that should be dimissed due to rule options.
func (*Rule) IsApproved ¶
type RuleRequirement ¶
type RuleRequirement struct {
// contains filtered or unexported fields
}
func (*RuleRequirement) Trigger ¶ added in v1.20.0
func (r *RuleRequirement) Trigger() common.Trigger
Click to show internal directories.
Click to hide internal directories.